From patchwork Tue Apr 17 15:31:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 899415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40QTk511cvz9s15 for ; Wed, 18 Apr 2018 01:31:24 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 35538E10; Tue, 17 Apr 2018 15:31:23 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id DDB99DF3 for ; Tue, 17 Apr 2018 15:31:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 256D3557 for ; Tue, 17 Apr 2018 15:31:20 +0000 (UTC) Received: from sigabrt.gateway.sonic.net (173-228-112-105.dsl.dynamic.fusionbroadband.com [173.228.112.105]) (Authenticated sender: blp@ovn.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 0F09F100016; Tue, 17 Apr 2018 17:31:17 +0200 (CEST) From: Ben Pfaff To: dev@openvswitch.org Date: Tue, 17 Apr 2018 08:31:13 -0700 Message-Id: <20180417153113.12125-1-blp@ovn.org> X-Mailer: git-send-email 2.16.1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH] socket-util: Improve comments on (host, port) parsing functions. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Fixes: 0b043300dbad ("Make : parsing uniform treewide.") Suggested-by: Mark Michelson Signed-off-by: Ben Pfaff Acked-by: Mark Michelson --- lib/socket-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/socket-util.c b/lib/socket-util.c index 12d16f582d52..1071a328d49a 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -387,7 +387,7 @@ inet_parse_tokens__(char *s, int host_index, char **hostp, char **portp) /* Parses 's', a string in the form "[:]", into its (required) host * and (optional) port components, and stores pointers to them in '*hostp' and * '*portp' respectively. Always sets '*hostp' nonnull, although possibly to - * an empty string empty string. Can set '*portp' to the null string. + * an empty string. Can set '*portp' to the null string. * * Supports both IPv4 and IPv6. IPv6 addresses may be quoted with square * brackets. Resolves ambiguous cases that might represent an IPv6 address or @@ -404,7 +404,7 @@ inet_parse_host_port_tokens(char *s, char **hostp, char **portp) /* Parses 's', a string in the form "[:]", into its port and host * components, and stores pointers to them in '*portp' and '*hostp' - * respectively. Both '*portp' and '*hostp' can end up null. + * respectively. Either '*portp' and '*hostp' (but not both) can end up null. * * Supports both IPv4 and IPv6. IPv6 addresses may be quoted with square * brackets. Resolves ambiguous cases that might represent an IPv6 address or