summaryrefslogtreecommitdiff
path: root/shadow/sgetspent.c
diff options
context:
space:
mode:
Diffstat (limited to 'shadow/sgetspent.c')
-rw-r--r--shadow/sgetspent.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/shadow/sgetspent.c b/shadow/sgetspent.c
index a3c61f9026..d18e5d78fb 100644
--- a/shadow/sgetspent.c
+++ b/shadow/sgetspent.c
@@ -28,9 +28,10 @@ Cambridge, MA 02139, USA. */
struct spwd *
sgetspent (const char *string)
{
- static struct spwd result;
+ static struct spwd resbuf;
static int max_size = 0;
static char *buffer = NULL;
+ struct spwd *result;
int len;
len = strlen (string) + 1;
@@ -42,5 +43,6 @@ sgetspent (const char *string)
return NULL;
}
- return __sgetspent_r (string, &result, buffer, max_size);
+ return __sgetspent_r (string, &resbuf, buffer, max_size, &result)
+ ? NULL : result;
}