]> git.draconx.ca Git - cdecl99.git/blobdiff - t/rendertest.c
cdecl99: Optimize print_version a bit.
[cdecl99.git] / t / rendertest.c
index 93574e2ef9a5b1ce611ab1a95135196ccc072535..e5299c292fc662f842c03113b232dfa0dbc95d90 100644 (file)
@@ -26,7 +26,7 @@
 #include <cdecl.h>
 #include "test.h"
 
-#define PROGNAME "outbuf"
+#define PROGNAME "rendertest"
 static const char *progname = PROGNAME;
 static const char sopts[] = "n:ECVH";
 static const struct option lopts[] = {
@@ -85,7 +85,7 @@ static int do_test(char *line, unsigned long n, int mode)
                return -1;
        }
 
-       printf("%lu %.*s\n", (unsigned long)rc, -(n>0), line);
+       printf(n > 0 ? "%lu %s\n" : "%lu\n", (unsigned long)rc, line);
        cdecl_free(decl);
        return 0;
 }