From 6d5c404b9c33e47ef4700fc3f2707fecadbe1bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Sun, 11 Jan 1998 01:00:19 +0100 Subject: [PATCH] Fixed a bug. Rev: src/modules/system/system.c:1.36 --- src/modules/system/system.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/modules/system/system.c b/src/modules/system/system.c index 6a07ca3e0a..38575d74c8 100644 --- a/src/modules/system/system.c +++ b/src/modules/system/system.c @@ -1,5 +1,5 @@ /* - * $Id: system.c,v 1.35 1998/01/10 21:21:53 hubbe Exp $ + * $Id: system.c,v 1.36 1998/01/11 00:00:19 grubba Exp $ * * System-call module for Pike * @@ -14,7 +14,7 @@ #include "system.h" #include "global.h" -RCSID("$Id: system.c,v 1.35 1998/01/10 21:21:53 hubbe Exp $"); +RCSID("$Id: system.c,v 1.36 1998/01/11 00:00:19 grubba Exp $"); #include "module_support.h" #include "las.h" #include "interpret.h" @@ -24,6 +24,7 @@ RCSID("$Id: system.c,v 1.35 1998/01/10 21:21:53 hubbe Exp $"); #include "mapping.h" #include "builtin_functions.h" #include "constants.h" +#include "pike_memory.h" #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -318,13 +319,13 @@ void f_setgroups(INT32 args) get_all_args("setgroups", args, "%a", &arr); if ((size = arr->size)) { - gids = xalloc(arr->size * sizeof(gid_t)); + gids = (gid_t *)xalloc(arr->size * sizeof(gid_t)); } else { gids = safeguard; } for (i=0; i < size; i++) { - if (arr->item[i].type != T_INTEGER) { + if (arr->item[i].type != T_INT) { /* Only reached if arr->size > 0 * so we always have an allocated gids here. */ @@ -361,7 +362,7 @@ void f_getgroups(INT32 args) /* OS which doesn't understand this convention */ numgrps = NGROUPS_MAX; } - gids = xalloc(sizeof(gid_t) * numgrps); + gids = (gid_t *)xalloc(sizeof(gid_t) * numgrps); numgrps = getgroups(numgrps, gids); @@ -374,7 +375,7 @@ void f_getgroups(INT32 args) report_error("getgroups"); } - f_aggregate_array(numgrps); + f_aggregate(numgrps); } #endif /* HAVE_GETGROUPS */ -- GitLab