mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-05 08:58:02 +02:00
brei: fix a compiler warning in release mode
Re-ordering commands in buildtype=release means recvfd may not be set by the time _cleanup_ is called (due to the goto outs). Replace those with return statements, it's more logical here anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
e238a5d049
commit
b913e7e609
1 changed files with 2 additions and 3 deletions
|
|
@ -99,10 +99,9 @@ brei_dispatch(int fd,
|
|||
if (rc == -EAGAIN) {
|
||||
return 0;
|
||||
} else if (rc == 0) {
|
||||
rc = -ECANCELED;
|
||||
goto error;
|
||||
return -ECANCELED;
|
||||
} else if (rc < 0) {
|
||||
goto error;
|
||||
return rc;
|
||||
}
|
||||
|
||||
_cleanup_close_ int recvfd = -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue