Reverse if() logic to improve readability.

Reviewed by:	ru
This commit is contained in:
obrien 2008-09-23 14:25:38 +00:00
parent bc0c6af203
commit 8cb3aed24c

View File

@ -649,14 +649,13 @@ ioctl(struct thread *td, struct ioctl_args *uap)
return (ENOTTY);
if (size > 0) {
if (!(com & IOC_VOID))
data = malloc((u_long)size, M_IOCTLOPS, M_WAITOK);
else {
if (com & IOC_VOID) {
/* Integer argument. */
arg = (intptr_t)uap->data;
data = (void *)&arg;
size = 0;
}
} else
data = malloc((u_long)size, M_IOCTLOPS, M_WAITOK);
} else
data = (void *)&uap->data;
if (com & IOC_IN) {