aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-01-22 11:07:57 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-30 11:14:46 +0100
commit86dcd37b7f64e4bd4ef30b1bcda12474e00c92c5 (patch)
tree2a4b48149f0c31b6241c668dada8906f152b353e
parent7e2ecb51004e148e2e06ea195c1ff67e4f9d8d5a (diff)
downloadslirp-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.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/slirp.c b/slirp.c
index 66ca489..db59b47 100644
--- a/slirp.c
+++ b/slirp.c
@@ -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;