[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/31] net/slirp: simplify checking for cmd: prefix
From: |
Samuel Thibault |
Subject: |
[Qemu-devel] [PULL 05/31] net/slirp: simplify checking for cmd: prefix |
Date: |
Sun, 27 Jan 2019 13:05:00 +0100 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>
---
net/slirp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/slirp.c b/net/slirp.c
index ec07f662c0..b91741b8fc 100644
--- 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);
--
2.20.1
- [Qemu-devel] [PULL 00/31] More work towards libslirp, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 05/31] net/slirp: simplify checking for cmd: prefix,
Samuel Thibault <=
- [Qemu-devel] [PULL 01/31] slirp: Avoid unaligned 16bit memory access, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 06/31] net/slirp: free forwarding rules on cleanup, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 02/31] slirp: Avoid marking naturally packed structs as QEMU_PACKED, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 07/31] net/slirp: fix leaks on forwarding rule registration error, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 04/31] slirp: generalize guestfwd with a callback based approach, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 19/31] slirp: remove qemu timer.h dependency, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 08/31] slirp: add callbacks for timer, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 14/31] slirp: replace qemu_notify_event() with a callback, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 23/31] slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 09/31] slirp: replace trace functions with DEBUG calls, Samuel Thibault, 2019/01/27