projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don't let endgrent clobber errno, no matter how improbable.
[gnulib.git]
/
lib
/
getugroups.c
diff --git
a/lib/getugroups.c
b/lib/getugroups.c
index
d63a607
..
43d0650
100644
(file)
--- a/
lib/getugroups.c
+++ b/
lib/getugroups.c
@@
-99,7
+99,11
@@
getugroups (int maxcount, GETGROUPS_T *grouplist, char const *username,
}
done:
- endgrent ();
+ {
+ int saved_errno = errno;
+ endgrent ();
+ errno = saved_errno;
+ }
return count;
}