From: Ben Pfaff Date: Mon, 28 Jul 2008 17:11:51 +0000 (-0700) Subject: Avert GCC false-positive warning. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f12a5936173a7182fec670b2891137fc66adc929;p=openvswitch Avert GCC false-positive warning. --- diff --git a/lib/vlog.c b/lib/vlog.c index 1cc24f85..6e098ef9 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -350,7 +350,8 @@ vlog(enum vlog_module module, enum vlog_level level, const char *message, ...) [VLL_WARN] = LOG_WARNING, [VLL_DBG] = LOG_DEBUG, }; - char *line, *save_ptr; + char *save_ptr = NULL; + char *line; for (line = strtok_r(s + time_len, "\n", &save_ptr); line != NULL; line = strtok_r(NULL, "\n", &save_ptr)) {