Oops, fix my broken handling of new l_len<0 case
This commit is contained in:
parent
e3e2c03de3
commit
62be011ebd
@ -133,10 +133,12 @@ lf_advlock(ap, head, size)
|
|||||||
if (start < 0)
|
if (start < 0)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
if (fl->l_len < 0) {
|
if (fl->l_len < 0) {
|
||||||
start += fl->l_len;
|
if (start == 0)
|
||||||
if (start <= 0)
|
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
end = start - 1;
|
end = start - 1;
|
||||||
|
start += fl->l_len;
|
||||||
|
if (start < 0)
|
||||||
|
return (EINVAL);
|
||||||
} else if (fl->l_len == 0)
|
} else if (fl->l_len == 0)
|
||||||
end = -1;
|
end = -1;
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user