diff options
author | charnier <charnier@FreeBSD.org> | 1997-11-25 07:14:34 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-11-25 07:14:34 +0000 |
commit | a8f4ef9a1d73a061da542afd0f8035bae3f08053 (patch) | |
tree | 91ac9a20a8ad83fbeeefd62c04804645e7ac50a3 /libexec/revnetgroup/parse_netgroup.c | |
parent | cf4eb29e4783f9f144996339a3e84512d0877644 (diff) | |
download | FreeBSD-src-a8f4ef9a1d73a061da542afd0f8035bae3f08053.zip FreeBSD-src-a8f4ef9a1d73a061da542afd0f8035bae3f08053.tar.gz |
Use warn(3). Hardcode progname instead of using argv[0]. Use Pa for file
name.
Diffstat (limited to 'libexec/revnetgroup/parse_netgroup.c')
-rw-r--r-- | libexec/revnetgroup/parse_netgroup.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libexec/revnetgroup/parse_netgroup.c b/libexec/revnetgroup/parse_netgroup.c index 14e7e23..19a9010 100644 --- a/libexec/revnetgroup/parse_netgroup.c +++ b/libexec/revnetgroup/parse_netgroup.c @@ -34,9 +34,10 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "$Id$"; -#endif /* LIBC_SCCS and not lint */ +#ifndef lint +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ /* * This is a specially hacked-up version of getnetgrent.c used to parse @@ -51,10 +52,6 @@ static char sccsid[] = "$Id$"; #include <unistd.h> #include "hash.h" -#ifndef lint -static const char rcsid[] = "$Id$"; -#endif - /* * Static Variables and functions used by setnetgrent(), getnetgrent() and * __endnetgrent(). @@ -211,7 +208,7 @@ parse_netgrp(group) * spewing it out from inside libc can actually hose * certain programs. */ - fprintf(stderr, "Cycle in netgroup %s\n", lp->l_groupname); + warnx("cycle in netgroup %s", lp->l_groupname); #endif return (1); } else @@ -265,7 +262,7 @@ parse_netgrp(group) * stay silent by default for compatibility's sake. */ if (fields < 3) - fprintf(stderr, "Bad entry (%s%s%s%s%s) in netgroup \"%s\"\n", + warnx("bad entry (%s%s%s%s%s) in netgroup \"%s\"", grp->ng_str[NG_HOST] == NULL ? "" : grp->ng_str[NG_HOST], grp->ng_str[NG_USER] == NULL ? "" : ",", grp->ng_str[NG_USER] == NULL ? "" : grp->ng_str[NG_USER], |