From c64f50d1e250879611e6f328e2c4fb18c8a4ab0c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 22 Jan 2013 11:07:57 +0100 Subject: g_strdup(NULL) returns NULL; simplify Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- slirp/slirp.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'slirp') 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; -- cgit v1.1