diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-11-10 17:45:39 +0400 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-01-14 00:40:54 +0100 |
commit | 3ed9f823c688c0dd5dd8d2c936329168c4859d02 (patch) | |
tree | ecb05a808d31a1a7713257ddf5393a85430bbea4 /net/slirp.c | |
parent | 7765bee0e3bf5c5e0f396337b341c657fc1152c9 (diff) |
slirp: use a dedicated field for chardev pointer
Let's not mix command line and chardev pointers.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'net/slirp.c')
-rw-r--r-- | net/slirp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/slirp.c b/net/slirp.c index dd06b0189e..58d880de8d 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -709,8 +709,8 @@ static int slirp_smb(SlirpState* s, const char *exported_dir, CONFIG_SMBD_COMMAND, s->smb_dir, smb_conf); g_free(smb_conf); - if (slirp_add_exec(s->slirp, 0, smb_cmdline, &vserver_addr, 139) < 0 || - slirp_add_exec(s->slirp, 0, smb_cmdline, &vserver_addr, 445) < 0) { + if (slirp_add_exec(s->slirp, NULL, smb_cmdline, &vserver_addr, 139) < 0 || + slirp_add_exec(s->slirp, NULL, smb_cmdline, &vserver_addr, 445) < 0) { slirp_smb_cleanup(s); g_free(smb_cmdline); error_setg(errp, "Conflicting/invalid smbserver address"); @@ -774,7 +774,7 @@ static int slirp_guestfwd(SlirpState *s, const char *config_str, Error **errp) snprintf(buf, sizeof(buf), "guestfwd.tcp.%d", port); if ((strlen(p) > 4) && !strncmp(p, "cmd:", 4)) { - if (slirp_add_exec(s->slirp, 0, &p[4], &server, port) < 0) { + if (slirp_add_exec(s->slirp, NULL, &p[4], &server, port) < 0) { error_setg(errp, "Conflicting/invalid host:port in guest " "forwarding rule '%s'", config_str); return -1; @@ -801,7 +801,7 @@ static int slirp_guestfwd(SlirpState *s, const char *config_str, Error **errp) return -1; } - if (slirp_add_exec(s->slirp, 3, &fwd->hd, &server, port) < 0) { + if (slirp_add_exec(s->slirp, &fwd->hd, NULL, &server, port) < 0) { error_setg(errp, "Conflicting/invalid host:port in guest " "forwarding rule '%s'", config_str); g_free(fwd); |