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 /ovsdb | |
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 'ovsdb')
-rw-r--r-- | ovsdb/replication.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ovsdb/replication.c b/ovsdb/replication.c index 1fa0f253a..9bf3721be 100644 --- a/ovsdb/replication.c +++ b/ovsdb/replication.c @@ -115,7 +115,7 @@ replication_run(struct shash *all_dbs) void set_remote_ovsdb_server(const char *remote_server) { - remote_ovsdb_server = remote_server ? xstrdup(remote_server) : NULL; + remote_ovsdb_server = nullable_xstrdup(remote_server); } void |