From 5604d27258885d40d9e3c74b737129e3beb96740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Wed, 27 Oct 1999 17:03:57 +0200 Subject: [PATCH] Bugfix. Rev: src/modules/system/system.c:1.75 --- src/modules/system/system.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/system/system.c b/src/modules/system/system.c index 80d4c8b048..edd3991040 100644 --- a/src/modules/system/system.c +++ b/src/modules/system/system.c @@ -1,5 +1,5 @@ /* - * $Id: system.c,v 1.74 1999/10/27 14:53:24 grubba Exp $ + * $Id: system.c,v 1.75 1999/10/27 15:03:57 grubba Exp $ * * System-call module for Pike * @@ -15,7 +15,7 @@ #include "system_machine.h" #include "system.h" -RCSID("$Id: system.c,v 1.74 1999/10/27 14:53:24 grubba Exp $"); +RCSID("$Id: system.c,v 1.75 1999/10/27 15:03:57 grubba Exp $"); #ifdef HAVE_WINSOCK_H #include <winsock.h> #endif @@ -815,11 +815,12 @@ void f_uname(INT32 args) old_sp = sp; for(i=0; i < NELEM(si_fields); i++) { - int res; + long res; res = sysinfo(si_fields[i].command, buffer, PIKE_SI_BUFLEN); - if (res == 0) { + if (res >= 0) { push_text(si_fields[i].name); + /* FIXME: Get the length from the return value? */ push_text(buffer); } } -- GitLab