diff options
| author | Dr. David von Oheimb <[email protected]> | 2021-06-21 08:55:50 +0200 |
|---|---|---|
| committer | Dr. David von Oheimb <[email protected]> | 2021-11-17 15:48:34 +0100 |
| commit | 2ff286c26c29b69b02ca99656d26d2f8cfd54682 (patch) | |
| tree | 71a01c51c47d0dd9528ff14357615d71420ba5a1 /test/testutil | |
| parent | 80-test_cmp_http: Make server diagnostics more verbose to aid debugging (diff) | |
| download | openssl-2ff286c26c29b69b02ca99656d26d2f8cfd54682.tar.gz openssl-2ff286c26c29b69b02ca99656d26d2f8cfd54682.zip | |
Add and use HAS_PREFIX() and CHECK_AND_SKIP_PREFIX() for checking if string has literal prefix
Reviewed-by: Paul Dale <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/15847)
Diffstat (limited to 'test/testutil')
| -rw-r--r-- | test/testutil/stanza.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/testutil/stanza.c b/test/testutil/stanza.c index ba62f84517f..a3f833a543e 100644 --- a/test/testutil/stanza.c +++ b/test/testutil/stanza.c @@ -54,7 +54,7 @@ static int read_key(STANZA *s) s->curr++; if (!TEST_int_gt(BIO_puts(s->key, tmpbuf), 0)) return 0; - if (strncmp(tmpbuf, "-----END", 8) == 0) + if (HAS_PREFIX(tmpbuf, "-----END")) return 1; } TEST_error("Can't find key end"); |
