[ovs-dev] [PATCH] socket-util: Improve comments on (host, port) parsing functions.

Ben Pfaff blp at ovn.org
Tue Apr 17 15:31:13 UTC 2018


Fixes: 0b043300dbad ("Make <host>:<port> parsing uniform treewide.")
Suggested-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 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 "<host>[:<port>]", 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 "<port>[:<host>]", 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
-- 
2.16.1



More information about the dev mailing list