Commit 318610a0 authored by Mike Hibler's avatar Mike Hibler

correctly handle parsing a NULL list of args

parent bda6ffc7
......@@ -290,15 +290,17 @@ parse_args(char *buf, tg_action *tg)
* Parse out any new values
*/
cp = buf;
while ((cp = strsep(&buf, " ")) != NULL) {
if (sscanf(cp, "PACKETSIZE=%d", &psize) == 1)
continue;
if (cp != NULL) {
while ((cp = strsep(&buf, " ")) != NULL) {
if (sscanf(cp, "PACKETSIZE=%d", &psize) == 1)
continue;
if (sscanf(cp, "INTERVAL=%lf", &interval) == 1)
continue;
if (sscanf(cp, "INTERVAL=%lf", &interval) == 1)
continue;
if (sscanf(cp, "RATE=%d", &rate) == 1)
continue;
if (sscanf(cp, "RATE=%d", &rate) == 1)
continue;
}
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment