Cosmetique & style fixes from bde

This commit is contained in:
ache 2001-08-26 10:23:49 +00:00
parent b4da3c1f45
commit f50db91f63
3 changed files with 2 additions and 7 deletions

View File

@ -103,7 +103,7 @@ lf_advlock(ap, head, size)
{
register struct flock *fl = ap->a_fl;
register struct lockf *lock;
off_t start, end;
off_t start, end, oadd;
int error;
/*
@ -121,7 +121,6 @@ lf_advlock(ap, head, size)
break;
case SEEK_END:
/* 'size' is always >= 0 */
if ((fl->l_start > 0 && size > OFF_MAX - fl->l_start) ||
(fl->l_start < 0 && size + fl->l_start > OFF_MAX))
return (EOVERFLOW);
@ -143,9 +142,7 @@ lf_advlock(ap, head, size)
} else if (fl->l_len == 0)
end = -1;
else {
off_t oadd = fl->l_len - 1;
/* 'oadd' and 'start' are >= 0 */
oadd = fl->l_len - 1;
if (oadd > OFF_MAX - start)
return (EOVERFLOW);
end = start + oadd;

View File

@ -1640,7 +1640,6 @@ lseek(p, uap)
error = VOP_GETATTR(vp, &vattr, cred, p);
if (error)
return (error);
/* 'vattr.va_size' is always >= 0 */
if (noneg &&
((offset > 0 && vattr.va_size > OFF_MAX - offset) ||
(offset < 0 && vattr.va_size + offset > OFF_MAX)))

View File

@ -1640,7 +1640,6 @@ lseek(p, uap)
error = VOP_GETATTR(vp, &vattr, cred, p);
if (error)
return (error);
/* 'vattr.va_size' is always >= 0 */
if (noneg &&
((offset > 0 && vattr.va_size > OFF_MAX - offset) ||
(offset < 0 && vattr.va_size + offset > OFF_MAX)))