]> eyrie.org Git - kerberos/krb5-strength.git/blobdiff - tests/tap/basic.c
Update to rra-c-util 10.5
[kerberos/krb5-strength.git] / tests / tap / basic.c
index b5f42d0211a4f8bbb3ce50764e170a9c4bba9959..8f44f15d56db620f71662ae9e50edf175734409f 100644 (file)
@@ -13,7 +13,7 @@
  * documentation is at <https://www.eyrie.org/~eagle/software/c-tap-harness/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2009-2019 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2009-2019, 2021 Russ Allbery <eagle@eyrie.org>
  * Copyright 2001-2002, 2004-2008, 2011-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
@@ -349,7 +349,7 @@ finish(void)
 
     /* Print out the lazy plan if needed. */
     fflush(stderr);
-    if (_lazy && _planned > 0)
+    if (_lazy)
         printf("1..%lu\n", _planned);
 
     /* Print out a summary of the results. */
@@ -899,9 +899,9 @@ bstrndup(const char *s, size_t n)
     size_t length;
 
     /* Don't assume that the source string is nul-terminated. */
-    for (p = s; (size_t)(p - s) < n && *p != '\0'; p++)
+    for (p = s; (size_t) (p - s) < n && *p != '\0'; p++)
         ;
-    length = (size_t)(p - s);
+    length = (size_t) (p - s);
     copy = (char *) malloc(length + 1);
     if (copy == NULL)
         sysbail("failed to strndup %lu bytes", (unsigned long) length);