diff mbox series

[v3,4/4] net: remove unused get_str_sep() function

Message ID 20190517134748.340381-5-sgarzare@redhat.com (mailing list archive)
State New, archived
Headers show
Series Clean ups in net/net.c | expand

Commit Message

Stefano Garzarella May 17, 2019, 1:47 p.m. UTC
Since the get_str_sep() function is no longer used in
net/net.c, we can remove it.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
 net/net.c | 20 --------------------
 1 file changed, 20 deletions(-)
diff mbox series

Patch

diff --git a/net/net.c b/net/net.c
index 23f29ef1d2..4e1b25ba91 100644
--- a/net/net.c
+++ b/net/net.c
@@ -63,26 +63,6 @@  static QTAILQ_HEAD(, NetClientState) net_clients;
 /***********************************************************/
 /* network device redirectors */
 
-static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
-{
-    const char *p, *p1;
-    int len;
-    p = *pp;
-    p1 = strchr(p, sep);
-    if (!p1)
-        return -1;
-    len = p1 - p;
-    p1++;
-    if (buf_size > 0) {
-        if (len > buf_size - 1)
-            len = buf_size - 1;
-        memcpy(buf, p, len);
-        buf[len] = '\0';
-    }
-    *pp = p1;
-    return 0;
-}
-
 int parse_host_port(struct sockaddr_in *saddr, const char *str,
                     Error **errp)
 {