projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44b4ff2
)
net/slirp: simplify checking for cmd: prefix
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Thu, 17 Jan 2019 11:43:34 +0000
(15:43 +0400)
committer
Samuel Thibault
<samuel.thibault@ens-lyon.org>
Thu, 7 Feb 2019 13:49:08 +0000
(15:49 +0200)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
net/slirp.c
patch
|
blob
|
history
diff --git
a/net/slirp.c
b/net/slirp.c
index ec07f662c00f897604557c203e480e8496d5aa2b..b91741b8fc1836f80954f293f91f52c46cc741a8 100644
(file)
--- a/
net/slirp.c
+++ b/
net/slirp.c
@@
-773,7
+773,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 (
g_str_has_prefix(p, "cmd:"
)) {
if (slirp_add_exec(s->slirp, &p[4], &server, port) < 0) {
error_setg(errp, "Conflicting/invalid host:port in guest "
"forwarding rule '%s'", config_str);