rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit 37746b3d9d557f8c603715702d0cf38b4464d7b3
parent 5e881721eff63ace43b88082939800eb902c9c35
Author: tgoodwin <tgoodwin>
Date:   Mon, 16 Feb 1998 10:22:04 +0000

use ealloc(), not malloc()

Diffstat:
Mwhich.c | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/which.c b/which.c @@ -88,11 +88,8 @@ extern char *which(char *name, bool verbose) { gid = getegid(); #if HAVE_GETGROUPS ngroups = getgroups(0, (GETGROUPS_T *)0); - gidset = malloc(ngroups * sizeof(GETGROUPS_T)); - if (!gidset) - uerror("malloc"); - else - getgroups(ngroups, gidset); + gidset = ealloc(ngroups * sizeof(GETGROUPS_T)); + getgroups(ngroups, gidset); #endif } if (isabsolute(name)) /* absolute pathname? */