diff options
author | Ben Pfaff <blp@ovn.org> | 2016-06-24 21:23:16 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-06-26 20:31:28 -0700 |
commit | 2225c0b9355e6823a2adccfeef2fb3fe3cccb557 (patch) | |
tree | 03d24cfb8f4d38cc82dc08f728e4a0d4dae809d6 /vtep | |
parent | 05e81316ca53077b97ecf56c32b24b99efe3e51e (diff) | |
download | openvswitch-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.c | 2 |
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': |