mirror of
https://github.com/opnsense/src.git
synced 2026-04-26 08:37:50 -04:00
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
1 changed files with 2 additions and 2 deletions
|
|
@ -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 a new issue