Hello there,

this is a demonstration of the usefulness of "-Werror"!
The module getgroups erroneously has "==" instead of
an assignment in line 89. Patch is included.

Regards,
  Mats Erik Andersson, on behalf of GNU Inetutils


>From bf89980eb54951197ff94e19d258df204ad5f20a Mon Sep 17 00:00:00 2001
From: Mats Erik Andersson <m...@fridtjuv.inre.mea>
Date: Tue, 17 Sep 2013 00:44:47 +0200
Subject: [PATCH] getgroups: Misprinted assignment.

---
 ChangeLog       |    6 ++++++
 lib/getgroups.c |    2 +-
 2 filer ändrade, 7 tillägg(+), 1 borttagning(-)

diff --git a/ChangeLog b/ChangeLog
index 0007e17..042f4ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-09-17  Mats Erik Andersson <g...@gisladisker.se>  (tiny change)
+
+	getgroups: Statement without effect.
+	* lib/getgroups.c (rpl_getgroups) [HAVE_GETGROUPS]:
+	Change equality conditional to expected assignment.
+
 2013-09-09  Eric Blake  <ebl...@redhat.com>
 
 	glob: fix compilation
diff --git a/lib/getgroups.c b/lib/getgroups.c
index 9856adc..e71b543 100644
--- a/lib/getgroups.c
+++ b/lib/getgroups.c
@@ -86,7 +86,7 @@ rpl_getgroups (int n, gid_t *group)
         }
       saved_errno = errno;
       free (gbuf);
-      errno == saved_errno;
+      errno = saved_errno;
       return result;
     }
 
-- 
1.7.10.4

Reply via email to