summaryrefslogtreecommitdiff
path: root/lib/dpctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dpctl.c')
-rw-r--r--lib/dpctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/dpctl.c b/lib/dpctl.c
index 742fbce2d..0fc053e06 100644
--- a/lib/dpctl.c
+++ b/lib/dpctl.c
@@ -2174,7 +2174,7 @@ parse_ct_limit_zones(const char *argv, struct ovs_list *zone_limits,
argcopy = xstrdup(argv + 5);
next_zone = strtok_r(argcopy, ",", &save_ptr);
- do {
+ while (next_zone != NULL) {
if (ovs_scan(next_zone, "%"SCNu16, &zone)) {
ct_dpif_push_zone_limit(zone_limits, zone, 0, 0);
} else {
@@ -2182,7 +2182,8 @@ parse_ct_limit_zones(const char *argv, struct ovs_list *zone_limits,
free(argcopy);
return EINVAL;
}
- } while ((next_zone = strtok_r(NULL, ",", &save_ptr)) != NULL);
+ next_zone = strtok_r(NULL, ",", &save_ptr);
+ }
free(argcopy);
return 0;