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 | 86dcd37b7f64e4bd4ef30b1bcda12474e00c92c5 (patch) | |
tree | 2a4b48149f0c31b6241c668dada8906f152b353e | |
parent | 7e2ecb51004e148e2e06ea195c1ff67e4f9d8d5a (diff) | |
download | slirp-86dcd37b7f64e4bd4ef30b1bcda12474e00c92c5.zip slirp-86dcd37b7f64e4bd4ef30b1bcda12474e00c92c5.tar.gz slirp-86dcd37b7f64e4bd4ef30b1bcda12474e00c92c5.tar.bz2 |
g_strdup(NULL) returns NULL; simplifyv1.4.0-rc2v1.4.0-rc1v1.4.0-rc0v1.4.0
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | slirp.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -224,12 +224,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; |