Add and use HAS_PREFIX() and CHECK_AND_SKIP_PREFIX() for checking if string has liter...
[openssl.git] / test / testutil / stanza.c
index ba62f84517f3792dee40e5d9658c7f0b33bbc892..a3f833a543e8869118afb83443581d67f0140553 100644 (file)
@@ -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");