[ovs-dev,01/11] socket-util: Fix error in comment on ss_format_address().

Message ID 20180413172655.31638-1-blp@ovn.org
State Accepted
Headers show
Series
  • [ovs-dev,01/11] socket-util: Fix error in comment on ss_format_address().
Related show

Commit Message

Ben Pfaff April 13, 2018, 5:26 p.m.
The output for this function is a dynamic string and doesn't have a
fixed buffer size, so the comment was wrong.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 lib/socket-util.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Michelson April 16, 2018, 9:40 p.m. | #1
Love the patchset! I found a few minor issues in some of the comments 
but didn't see problems in the implementation. Note that I didn't review 
patch 9 because of unfamiliarity with the area.

Aside from the nits and patch 9:

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

On 04/13/2018 12:26 PM, Ben Pfaff wrote:
> The output for this function is a dynamic string and doesn't have a
> fixed buffer size, so the comment was wrong.
> 
> Signed-off-by: Ben Pfaff <blp@ovn.org>
> ---
>   lib/socket-util.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/lib/socket-util.c b/lib/socket-util.c
> index 7fbcdf19feac..5485e3b515dd 100644
> --- a/lib/socket-util.c
> +++ b/lib/socket-util.c
> @@ -995,8 +995,7 @@ is_safe_name(const char *name)
>   }
>   
>   /* Formats the IPv4 or IPv6 address in 'ss' into 's'.  If 'ss' is an IPv6
> - * address, puts square brackets around the address.  'bufsize' should be at
> - * least SS_NTOP_BUFSIZE. */
> + * address, puts square brackets around the address. */
>   void
>   ss_format_address(const struct sockaddr_storage *ss, struct ds *s)
>   {
>
Ben Pfaff April 17, 2018, 3:35 p.m. | #2
On Mon, Apr 16, 2018 at 04:40:11PM -0500, Mark Michelson wrote:
> Love the patchset! I found a few minor issues in some of the comments but
> didn't see problems in the implementation. Note that I didn't review patch 9
> because of unfamiliarity with the area.
> 
> Aside from the nits and patch 9:
> 
> Acked-by: Mark Michelson <mmichels@redhat.com>

Thanks a lot.  I applied this series to master.  I sent separate patches
for the fixes because somehow I didn't see your other emails;
fortunately they are only comment fixes.

Thanks again,

Ben.

Patch

diff --git a/lib/socket-util.c b/lib/socket-util.c
index 7fbcdf19feac..5485e3b515dd 100644
--- a/lib/socket-util.c
+++ b/lib/socket-util.c
@@ -995,8 +995,7 @@  is_safe_name(const char *name)
 }
 
 /* Formats the IPv4 or IPv6 address in 'ss' into 's'.  If 'ss' is an IPv6
- * address, puts square brackets around the address.  'bufsize' should be at
- * least SS_NTOP_BUFSIZE. */
+ * address, puts square brackets around the address. */
 void
 ss_format_address(const struct sockaddr_storage *ss, struct ds *s)
 {