From: Bruno Haible <bruno@clisp.org>
Date: Sat, 4 Jun 2011 11:01:55 +0000 (+0200)
Subject: strerror_r: Fix comments.
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23b18247253c80345d5fcf7173c5b734b0b8f434;p=pspp

strerror_r: Fix comments.

* lib/strerror_r.c (strerror_r): Update comments after 2011-06-01
commit.
---

diff --git a/ChangeLog b/ChangeLog
index 18d68be3b0..0406a5467d 100644
--- 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.
diff --git a/lib/strerror_r.c b/lib/strerror_r.c
index 93e33fa11c..d0c7be953e 100644
--- a/lib/strerror_r.c
+++ b/lib/strerror_r.c
@@ -181,9 +181,8 @@ strerror_r (int errnum, char *buf, size_t buflen)
       {
         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 @@ strerror_r (int errnum, char *buf, size_t buflen)
         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)