From c617db9065afa51100199d9ac4561feee4279291 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 12 Jun 2002 23:27:00 +0000 Subject: Silence warnings, clean things up. -Erik --- libc/pwd_grp/sgetspent.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'libc/pwd_grp/sgetspent.c') diff --git a/libc/pwd_grp/sgetspent.c b/libc/pwd_grp/sgetspent.c index 6f80c87d6..83b1144ee 100644 --- a/libc/pwd_grp/sgetspent.c +++ b/libc/pwd_grp/sgetspent.c @@ -19,23 +19,21 @@ #include #include -#include - -#define PWD_BUFFER_SIZE 256 +#include "config.h" int sgetspent_r (const char *string, struct spwd *spwd, char *buff, size_t buflen, struct spwd **crap) { - return(__sgetspent_r(string, spwd, buff, buflen)); + return(__sgetspent_r(string, spwd, buff, buflen)); } struct spwd *sgetspent(const char *string) { - static char line_buff[PWD_BUFFER_SIZE]; - static struct spwd spwd; + static char line_buff[PWD_BUFFER_SIZE]; + static struct spwd spwd; - if (sgetspent_r(string, &spwd, line_buff, PWD_BUFFER_SIZE, NULL) != -1) { - return &spwd; - } - return NULL; + if (sgetspent_r(string, &spwd, line_buff, sizeof(line_buff), NULL) != -1) { + return &spwd; + } + return NULL; } -- cgit v1.2.3