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 /slirp/slirp.c | |
parent | 6528499fa4c3ceaec01ad29d8090ef55918ebfb3 (diff) | |
download | hqemu-c64f50d1e250879611e6f328e2c4fb18c8a4ab0c.zip hqemu-c64f50d1e250879611e6f328e2c4fb18c8a4ab0c.tar.gz |
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 'slirp/slirp.c')
-rw-r--r-- | slirp/slirp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c index e93b578..0e6e232 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -225,12 +225,8 @@ Slirp *slirp_init(int restricted, struct in_addr vnetwork, pstrcpy(slirp->client_hostname, sizeof(slirp->client_hostname), vhostname); } - if (tftp_path) { - slirp->tftp_prefix = g_strdup(tftp_path); - } - if (bootfile) { - slirp->bootp_filename = g_strdup(bootfile); - } + slirp->tftp_prefix = g_strdup(tftp_path); + slirp->bootp_filename = g_strdup(bootfile); slirp->vdhcp_startaddr = vdhcp_start; slirp->vnameserver_addr = vnameserver; |