diff options
author | David Nugent <davidn@FreeBSD.org> | 1997-01-29 06:31:42 +0000 |
---|---|---|
committer | David Nugent <davidn@FreeBSD.org> | 1997-01-29 06:31:42 +0000 |
commit | 3e35f570b808af17aad79c9f23a866e7003b2728 (patch) | |
tree | 4372eb376bd1b05d6ac8cec38193e3344cf9d209 /libutil/login_cap.c | |
parent | 1ba1303637f69fca0b85c33fec7bb8610ebdf48b (diff) | |
download | pw-darwin-3e35f570b808af17aad79c9f23a866e7003b2728.tar.gz pw-darwin-3e35f570b808af17aad79c9f23a866e7003b2728.tar.zst pw-darwin-3e35f570b808af17aad79c9f23a866e7003b2728.zip |
Completed fixes with login_getcapsize().
Diffstat (limited to 'libutil/login_cap.c')
-rw-r--r-- | libutil/login_cap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libutil/login_cap.c b/libutil/login_cap.c index 392f320..d8e0f62 100644 --- a/libutil/login_cap.c +++ b/libutil/login_cap.c @@ -476,7 +476,7 @@ login_getcapsize(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) { rlim_t val = STRTOV(res, &ep, 0); if ((res == NULL) || (res == ep) || errno) return error; - switch (*ep) { + switch (*ep++) { case 0: /* end of string */ ep--; mult = 1; @@ -496,6 +496,7 @@ login_getcapsize(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) { default: return error; } + res = ep; tot += (val * mult); } return tot; |