simplify control flow so that gcc knows we never pass save to curthread_pflags_restore
without initializing
This commit is contained in:
parent
3ef78c9c96
commit
bfd0eacb02
@ -212,7 +212,7 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault)
|
||||
size_t cnt;
|
||||
int error, newflags, save;
|
||||
|
||||
error = 0;
|
||||
save = error = 0;
|
||||
|
||||
KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE,
|
||||
("uiomove: mode"));
|
||||
@ -275,7 +275,7 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault)
|
||||
n -= cnt;
|
||||
}
|
||||
out:
|
||||
if (uio->uio_segflg == UIO_USERSPACE)
|
||||
if (save)
|
||||
curthread_pflags_restore(save);
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user