diff options
author | Markus Armbruster <armbru@redhat.com> | 2013-01-22 11:07:57 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-01-30 11:14:46 +0100 |
commit | c64f50d1e250879611e6f328e2c4fb18c8a4ab0c (patch) | |
tree | 93e1a5b9279becfec8eba4477924cfa67a1f89b0 /net/net.c | |
parent | 6528499fa4c3ceaec01ad29d8090ef55918ebfb3 (diff) |
g_strdup(NULL) returns NULL; simplify
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -566,9 +566,7 @@ static int net_init_nic(const NetClientOptions *opts, const char *name, assert(peer); nd->netdev = peer; } - if (name) { - nd->name = g_strdup(name); - } + nd->name = g_strdup(name); if (nic->has_model) { nd->model = g_strdup(nic->model); } |