* lib/glob.c (glob): Fix longstanding misuse of errno after
getpwnam_r, which returns an error number rather than setting
errno.
2017-09-02 Paul Eggert <eggert@cs.ucla.edu>
+ glob: fix getpwnam_r errno typo
+ * lib/glob.c (glob): Fix longstanding misuse of errno after
+ getpwnam_r, which returns an error number rather than setting
+ errno.
+
glob: fix typo in recent change
* lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]:
Fix recently-introduced typo.
while (getpwnam_r (name, &pwbuf,
pwtmpbuf.data, pwtmpbuf.length, &p)
- != 0)
+ == ERANGE)
{
- if (errno != ERANGE)
- {
- p = NULL;
- break;
- }
if (!scratch_buffer_grow (&pwtmpbuf))
{
retval = GLOB_NOSPACE;
struct passwd pwbuf;
while (getpwnam_r (user_name, &pwbuf,
- pwtmpbuf.data, pwtmpbuf.length, &p) != 0)
+ pwtmpbuf.data, pwtmpbuf.length, &p)
+ == ERANGE)
{
- if (errno != ERANGE)
- {
- p = NULL;
- break;
- }
if (!scratch_buffer_grow (&pwtmpbuf))
{
retval = GLOB_NOSPACE;