diff mbox series

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

Message ID 20180417153113.12125-1-blp@ovn.org
State Accepted
Headers show
Series [ovs-dev] socket-util: Improve comments on (host, port) parsing functions. | expand

Commit Message

Ben Pfaff April 17, 2018, 3:31 p.m. UTC
Fixes: 0b043300dbad ("Make <host>:<port> parsing uniform treewide.")
Suggested-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 lib/socket-util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Michelson April 17, 2018, 8:12 p.m. UTC | #1
No surprise, but

Acked-by: Mark Michelson <mmichels@redhat.com>

On 04/17/2018 10:31 AM, Ben Pfaff wrote:
> Fixes: 0b043300dbad ("Make <host>:<port> parsing uniform treewide.")
> Suggested-by: Mark Michelson <mmichels@redhat.com>
> Signed-off-by: Ben Pfaff <blp@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
>
Ben Pfaff April 17, 2018, 8:47 p.m. UTC | #2
Thanks, applied to master.

On Tue, Apr 17, 2018 at 03:12:00PM -0500, Mark Michelson wrote:
> No surprise, but
> 
> Acked-by: Mark Michelson <mmichels@redhat.com>
> 
> On 04/17/2018 10:31 AM, Ben Pfaff wrote:
> >Fixes: 0b043300dbad ("Make <host>:<port> parsing uniform treewide.")
> >Suggested-by: Mark Michelson <mmichels@redhat.com>
> >Signed-off-by: Ben Pfaff <blp@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
> >
>
diff mbox series

Patch

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