changeset 14862:42eaca1a6673

strerror_r: Fix comments. * lib/strerror_r.c (strerror_r): Update comments after 2011-06-01 commit.
author Bruno Haible <bruno@clisp.org>
date Sat, 04 Jun 2011 13:01:55 +0200
parents baaff605722d
children c14b056a7ea7
files ChangeLog lib/strerror_r.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-06-04  Bruno Haible  <bruno@clisp.org>
+
+	strerror_r: Fix comments.
+	* lib/strerror_r.c (strerror_r): Update comments after 2011-06-01
+	commit.
+
 2011-06-04  Bruno Haible  <bruno@clisp.org>
 
 	perror: Fix compilation error.
--- a/lib/strerror_r.c
+++ b/lib/strerror_r.c
@@ -181,9 +181,8 @@
       {
         char stackbuf[STACKBUF_LEN];
 
-        /* strerror-impl.h is also affected if our choice of stackbuf
-           size is not large enough.  */
         if (strerror_r (errnum, stackbuf, sizeof stackbuf) == ERANGE)
+          /* STACKBUF_LEN should have been large enough.  */
           abort ();
         safe_copy (buf, buflen, stackbuf);
       }
@@ -198,7 +197,7 @@
         size_t len;
         strerror_r (errnum, stackbuf, sizeof stackbuf);
         len = strlen (stackbuf);
-        /* stackbuf should have been large enough.  */
+        /* STACKBUF_LEN should have been large enough.  */
         if (len + 1 == sizeof stackbuf)
           abort ();
         if (buflen <= len)