diff options
author | David Nugent <davidn@FreeBSD.org> | 1997-05-11 08:07:29 +0000 |
---|---|---|
committer | David Nugent <davidn@FreeBSD.org> | 1997-05-11 08:07:29 +0000 |
commit | 5903bc802ffd0c4a0229ac0b00197f8f0f52f478 (patch) | |
tree | 342835c41cca9d101e4ad2ff0ce15fd42bb6e8e9 /libutil/login_cap.c | |
parent | 028d38eb9a0940f31b6dc4d1d298789b71ca581d (diff) | |
download | pw-darwin-5903bc802ffd0c4a0229ac0b00197f8f0f52f478.tar.gz pw-darwin-5903bc802ffd0c4a0229ac0b00197f8f0f52f478.tar.zst pw-darwin-5903bc802ffd0c4a0229ac0b00197f8f0f52f478.zip |
MF2.2: bugfix in arrayize().
Diffstat (limited to 'libutil/login_cap.c')
-rw-r--r-- | libutil/login_cap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libutil/login_cap.c b/libutil/login_cap.c index 633da20..b1761ec 100644 --- a/libutil/login_cap.c +++ b/libutil/login_cap.c @@ -25,7 +25,7 @@ * * Low-level routines relating to the user capabilities database * - * $Id: login_cap.c,v 1.11 1997/02/27 00:24:05 ache Exp $ + * $Id: login_cap.c,v 1.12 1997/05/10 18:55:37 davidn Exp $ */ #include <stdio.h> @@ -115,13 +115,13 @@ arrayize(char *str, const char *chars, int *size) ++ptr; } - i = 0; /* alloc the array */ if ((ptr = allocstr(str)) != NULL) { if ((res = allocarray(++i)) == NULL) free(str); else { /* now split the string */ + i = 0; while (*ptr) { int count = strcspn(ptr, chars); res[i++] = ptr; |