Completed fixes with login_getcapsize().

This commit is contained in:
David Nugent 1997-01-29 06:31:42 +00:00
parent 93aa55544d
commit f9074e29fc

View File

@ -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); rlim_t val = STRTOV(res, &ep, 0);
if ((res == NULL) || (res == ep) || errno) if ((res == NULL) || (res == ep) || errno)
return error; return error;
switch (*ep) { switch (*ep++) {
case 0: /* end of string */ case 0: /* end of string */
ep--; ep--;
mult = 1; mult = 1;
@ -496,6 +496,7 @@ login_getcapsize(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) {
default: default:
return error; return error;
} }
res = ep;
tot += (val * mult); tot += (val * mult);
} }
return tot; return tot;