summaryrefslogtreecommitdiff
path: root/vtep
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2016-06-24 21:23:16 -0700
committerBen Pfaff <blp@ovn.org>2016-06-26 20:31:28 -0700
commit2225c0b9355e6823a2adccfeef2fb3fe3cccb557 (patch)
tree03d24cfb8f4d38cc82dc08f728e4a0d4dae809d6 /vtep
parent05e81316ca53077b97ecf56c32b24b99efe3e51e (diff)
downloadopenvswitch-2225c0b9355e6823a2adccfeef2fb3fe3cccb557.tar.gz
util: New function nullable_xstrdup().
It's a pretty common pattern so create a function for it. Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'vtep')
-rw-r--r--vtep/vtep-ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c
index 5c189712c..759150f1d 100644
--- a/vtep/vtep-ctl.c
+++ b/vtep/vtep-ctl.c
@@ -237,7 +237,7 @@ parse_options(int argc, char *argv[], struct shash *local_options)
}
shash_add_nocopy(local_options,
xasprintf("--%s", options[idx].name),
- optarg ? xstrdup(optarg) : NULL);
+ nullable_xstrdup(optarg));
break;
case 'h':