summaryrefslogtreecommitdiff
path: root/libc/pwd_grp/sgetspent.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-06-12 23:27:00 +0000
committerEric Andersen <andersen@codepoet.org>2002-06-12 23:27:00 +0000
commitc617db9065afa51100199d9ac4561feee4279291 (patch)
treee4a90725f73b9fb7ec9970ca495172181acfa873 /libc/pwd_grp/sgetspent.c
parentfd6b9378be20243eaea7da1c2ddb3d68f123d28e (diff)
Silence warnings, clean things up.
-Erik
Diffstat (limited to 'libc/pwd_grp/sgetspent.c')
-rw-r--r--libc/pwd_grp/sgetspent.c18
1 files changed, 8 insertions, 10 deletions
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 <errno.h>
#include <stdio.h>
-#include <shadow.h>
-
-#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;
}