All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 4/5] tst_safe_macros: add SAFE_GETGRNAM_FALLBACK()
Date: Thu, 11 Oct 2018 15:34:23 +0200	[thread overview]
Message-ID: <20181011133423.GC30924@rei.lan> (raw)
In-Reply-To: <20181008071651.16384-3-cfamullaconrad@suse.de>

Hi!
> +struct group *safe_getgrnam_fallback(const char *file, const int lineno,
> +				     const char *name, const char *fallback)
> +{
> +	struct group *rval;
> +

I've added a missing errno = 0; here and pushed.

Thanks.

> +	rval = getgrnam(name);
> +	if (rval == NULL) {
> +		tst_res_(file, lineno, TINFO,
> +			 "getgrnam(%s) failed - try fallback %s",
> +			 name, fallback);
> +		rval = safe_getgrnam(file, lineno, fallback);
> +	}
> +
> +	return rval;
> +}
> +
>  struct group *safe_getgrgid(const char *file, const int lineno, gid_t gid)
>  {
>  	struct group *rval;
> -- 
> 2.16.4
> 

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2018-10-11 13:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08  7:16 [LTP] [PATCH v3 2/5] tst_safe_macros: add SAFE_GETGRGID() Clemens Famulla-Conrad
2018-10-08  7:16 ` [LTP] [PATCH v3 3/5] setregid02: Convert to newlib Clemens Famulla-Conrad
2018-10-11 13:33   ` Cyril Hrubis
2018-10-08  7:16 ` [LTP] [PATCH v3 4/5] tst_safe_macros: add SAFE_GETGRNAM_FALLBACK() Clemens Famulla-Conrad
2018-10-11 13:34   ` Cyril Hrubis [this message]
2018-10-08  7:16 ` [LTP] [PATCH v3 5/5] setregid04: Convert to newlib Clemens Famulla-Conrad
2018-10-11 13:34   ` Cyril Hrubis
2018-10-11 13:32 ` [LTP] [PATCH v3 2/5] tst_safe_macros: add SAFE_GETGRGID() Cyril Hrubis

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=20181011133423.GC30924@rei.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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.