Completed fixes with login_getcapsize().
This commit is contained in:
parent
bf6ca936d9
commit
8a947da194
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user