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 94a4439c2f7a765296720b5421fe36a9eba948ce..73aee7bd2c1c5e9045bd05029c757208401844f7 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;