This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.17-206-g550a0b8


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  550a0b89b464356c5fa44b16a28f49ab1df5b04a (commit)
      from  3392138235f454f2b9375a26d78c0c35808dd087 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=550a0b89b464356c5fa44b16a28f49ab1df5b04a

commit 550a0b89b464356c5fa44b16a28f49ab1df5b04a
Author: Roland McGrath <roland@hack.frob.com>
Date:   Fri Feb 8 14:55:50 2013 -0800

    Fix PF_LOCAL socket example sockaddr_un size calculation.

diff --git a/ChangeLog b/ChangeLog
index 27cbc6d..f3c8d4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-08  Roland McGrath  <roland@hack.frob.com>
+
+	* manual/examples/mkfsock.c (make_named_socket): Don't add one for
+	the '\0' terminator.
+
 2013-02-08  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #13550]
diff --git a/manual/examples/mkfsock.c b/manual/examples/mkfsock.c
index 1469e02..1a2b7f1 100644
--- a/manual/examples/mkfsock.c
+++ b/manual/examples/mkfsock.c
@@ -45,13 +45,12 @@ make_named_socket (const char *filename)
 
   /* The size of the address is
      the offset of the start of the filename,
-     plus its length,
-     plus one for the terminating null byte.
+     plus its length (not including the terminating null byte).
      Alternatively you can just do:
      size = SUN_LEN (&name);
   */
   size = (offsetof (struct sockaddr_un, sun_path)
-	  + strlen (name.sun_path) + 1);
+	  + strlen (name.sun_path));
 
   if (bind (sock, (struct sockaddr *) &name, size) < 0)
     {

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |    5 +++++
 manual/examples/mkfsock.c |    5 ++---
 2 files changed, 7 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]