chiark / gitweb /
subdirmk/generate: Supply default target if none given in command line
[subdirmk.git] / lib / t / toytest.c
index 233a4295cfa417a5bad736d3a5b676a0c7a48018..aa03e1ec6baaee6d8774e3f5e16bdbb060b6c8d6 100644 (file)
@@ -1,3 +1,9 @@
+/*
+ * subdirmk - example code
+ *  Copyright 2019 Mark Wooding
+ * SPDX-License-Identifier: LGPL-2.0-or-later
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -9,7 +15,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);
   }