From patchwork Fri May 17 13:47:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Garzarella X-Patchwork-Id: 10948003 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D410E1395 for ; Fri, 17 May 2019 13:52:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C21C927F92 for ; Fri, 17 May 2019 13:52:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6B1627F97; Fri, 17 May 2019 13:52:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6613127F93 for ; Fri, 17 May 2019 13:52:49 +0000 (UTC) Received: from localhost ([127.0.0.1]:49002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRdI0-0003j6-Lo for patchwork-qemu-devel@patchwork.kernel.org; Fri, 17 May 2019 09:52:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRdDa-00006l-1o for qemu-devel@nongnu.org; Fri, 17 May 2019 09:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRdDW-0003bT-98 for qemu-devel@nongnu.org; Fri, 17 May 2019 09:48:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53198) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRdDW-0003ZH-3b for qemu-devel@nongnu.org; Fri, 17 May 2019 09:48:10 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D500A75724 for ; Fri, 17 May 2019 13:48:07 +0000 (UTC) Received: from steredhat.redhat.com (ovpn-116-83.ams2.redhat.com [10.36.116.83]) by smtp.corp.redhat.com (Postfix) with ESMTP id 953B35DA64; Fri, 17 May 2019 13:48:06 +0000 (UTC) From: Stefano Garzarella To: qemu-devel@nongnu.org Date: Fri, 17 May 2019 15:47:48 +0200 Message-Id: <20190517134748.340381-5-sgarzare@redhat.com> In-Reply-To: <20190517134748.340381-1-sgarzare@redhat.com> References: <20190517134748.340381-1-sgarzare@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 17 May 2019 13:48:07 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 4/4] net: remove unused get_str_sep() function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jason Wang , Markus Armbruster Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Since the get_str_sep() function is no longer used in net/net.c, we can remove it. Signed-off-by: Stefano Garzarella Reviewed-by: Markus Armbruster --- net/net.c | 20 -------------------- 1 file changed, 20 deletions(-) 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) {