diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2007-03-05 20:29:15 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2007-03-05 20:29:15 +0000 |
commit | b98fe50008bf820e7860d4f809f4dab375de6892 (patch) | |
tree | 5ae94125f39e23f8750efc654653423c474b0bb9 /usr.sbin | |
parent | 4c16e5fd939a3e95613d067c6fc7120f14e1befb (diff) |
Remove _err() calls from getnetgrent.c. This is a minor API change
as _ng_sl_add() now returns a value. The only consumer of that
interface is netgroup_mkdb(8). Adapted from NetBSD.
OK deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/netgroup_mkdb/netgroup_mkdb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c index fdb90187fab..ffea15e8703 100644 --- a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c +++ b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netgroup_mkdb.c,v 1.12 2005/05/16 03:12:59 deraadt Exp $ */ +/* $OpenBSD: netgroup_mkdb.c,v 1.13 2007/03/05 20:29:14 millert Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ #ifndef lint -static char *rcsid = "$OpenBSD: netgroup_mkdb.c,v 1.12 2005/05/16 03:12:59 deraadt Exp $"; +static char *rcsid = "$OpenBSD: netgroup_mkdb.c,v 1.13 2007/03/05 20:29:14 millert Exp $"; #endif #include <sys/types.h> @@ -363,7 +363,10 @@ ng_reventry(DB *db, DB *udb, struct nentry *fe, char *name, size_t s, warnx("Cycle in netgroup `%s'", name); return; } - _ng_sl_add(ss, fe->n_name); + if (_ng_sl_add(ss, fe->n_name) == -1) { + warn(NULL); + return; + } for (e = fe->n_next; e != NULL; e = e->n_next) switch (e->n_type) { |