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:
Peter Hutterer 2020-08-24 12:29:07 +10:00
parent e238a5d049
commit b913e7e609

View file

@ -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;