From: Justin Pettit Date: Wed, 8 Jul 2009 21:43:29 +0000 (-0700) Subject: Cleanup warnings about "save_ptr" in strtok_r argument X-Git-Tag: v0.90.5~88 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ba8de5cbc7a5a1edadf371107c55f946e25421d3;p=sliver-openvswitch.git Cleanup warnings about "save_ptr" in strtok_r argument The compiler warns about the "save_ptr" argument to strtok_r being unitialized. This cleans that up. --- diff --git a/lib/vconn-ssl.c b/lib/vconn-ssl.c index ef1b56439..f681bdf04 100644 --- a/lib/vconn-ssl.c +++ b/lib/vconn-ssl.c @@ -280,7 +280,8 @@ ssl_vconn_cast(struct vconn *vconn) static int ssl_open(const char *name, char *suffix, struct vconn **vconnp) { - char *save_ptr, *host_name, *port_string; + char *save_ptr = NULL; + char *host_name, *port_string; struct sockaddr_in sin; int retval; int fd; diff --git a/lib/vconn-tcp.c b/lib/vconn-tcp.c index a91b7d381..116171385 100644 --- a/lib/vconn-tcp.c +++ b/lib/vconn-tcp.c @@ -72,7 +72,7 @@ new_tcp_vconn(const char *name, int fd, int connect_status, static int tcp_open(const char *name, char *suffix, struct vconn **vconnp) { - char *save_ptr; + char *save_ptr = NULL; const char *host_name; const char *port_string; struct sockaddr_in sin; diff --git a/lib/vlog.c b/lib/vlog.c index 97a930aca..1b95d96c1 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -314,7 +314,7 @@ vlog_reopen_log_file(void) char * vlog_set_levels_from_string(const char *s_) { - char *save_ptr; + char *save_ptr = NULL; char *s = xstrdup(s_); char *module, *facility; diff --git a/secchan/netflow.c b/secchan/netflow.c index e867c0ebc..0162c45ab 100644 --- a/secchan/netflow.c +++ b/secchan/netflow.c @@ -107,7 +107,7 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); static int open_collector(char *dst) { - char *save_ptr; + char *save_ptr = NULL; const char *host_name; const char *port_string; struct sockaddr_in sin;