chiark / gitweb /
lib/t/toytest.c: Make test more perspicuous.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 8 Nov 2019 17:32:50 +0000 (17:32 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 8 Nov 2019 17:32:50 +0000 (17:32 +0000)
What was I thinking?

lib/t/toytest.c

index 233a429..0971427 100644 (file)
@@ -9,7 +9,7 @@ int main(void)
   const char *p;
 
   p = greeting();
-  if (!STRNCMP(p, ==, "Hello", 5)) {
+  if (STRNCMP(p, !=, "Hello", 5)) {
     fprintf(stderr, "greeting `%s' has bad salutation\n", p);
     exit(1);
   }