All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lennart Poettering <lennart@poettering.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] fix util_lookup_group to handle large groups
Date: Mon, 24 Aug 2009 17:50:02 +0000	[thread overview]
Message-ID: <20090824175002.GA1413@tango.0pointer.de> (raw)
In-Reply-To: <m1skgcjea5.fsf@fess.ebiederm.org>

On Mon, 24.08.09 18:50, Ansgar Johannes Pflipsen (pflipsen@ti.rwth-aachen.de) wrote:

> 		errno = 0;
> 		getgrnam_r(group, &grbuf, buf, buflen, &gr);
> 		if (gr != NULL)
> 			gid = gr->gr_gid;
> 		else if (errno = ERANGE) {
> 			buflen *= 2;	<<-- 0 * 2 = 0
> 			continue;
> 		}

One little comment here: on POSIX getrnam_r() doesn't touch
errno. Instead it returns the error value as return value.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

  parent reply	other threads:[~2009-08-24 17:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-01  5:26 [PATCH] fix util_lookup_group to handle large groups Eric W. Biederman
2009-08-01 12:36 ` Alan Jenkins
2009-08-01 13:43 ` Kay Sievers
2009-08-24 16:50 ` Ansgar Johannes Pflipsen
2009-08-24 17:50 ` Lennart Poettering [this message]
2009-08-25 12:52 ` Ansgar Johannes Pflipsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090824175002.GA1413@tango.0pointer.de \
    --to=lennart@poettering.net \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.