Get rid of compiler warning under gcc 4.2.
authorJustin Pettit <jpettit@nicira.com>
Mon, 5 May 2008 05:29:48 +0000 (22:29 -0700)
committerJustin Pettit <jpettit@nicira.com>
Mon, 5 May 2008 05:29:48 +0000 (22:29 -0700)
datapath/unit.c

index 94a4439..73aee7b 100644 (file)
@@ -72,7 +72,11 @@ static int run_test(const char *name, size_t len)
 int unit_init(void)
 {
        int n_pass = 0, n_fail = 0;
-       char *p = run ?: "";
+       char *p = run;
+
+       if (p == NULL) {
+               p = "";
+       }
        for (;;) {
                static const char white_space[] = " \t\r\n\v,";
                int len;