On Wed, 22 Aug 2018, Stefano Brivio wrote: > As we loop as long as 'ret' is greater than zero, and break only > if we get an error in mnl_cb_run2 (with ret <= 0), we can just > return ret without checking once more if it's greater than zero. > > Signed-off-by: Stefano Brivio <sbrivio@xxxxxxxxxx> > --- > lib/mnl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/mnl.c b/lib/mnl.c > index a0fa66ecdb80..4e075cf94f00 100644 > --- a/lib/mnl.c > +++ b/lib/mnl.c > @@ -115,7 +115,7 @@ ipset_mnl_query(struct ipset_handle *handle, void *buffer, size_t len) > ret = mnl_socket_recvfrom(handle->h, buffer, len); > D("message received, ret: %d", ret); > } > - return ret > 0 ? 0 : ret; > + return ret; > } Patch is applied, thanks. Best regards, Jozsef - E-mail : kadlec@xxxxxxxxxxxxxxxxx, kadlecsik.jozsef@xxxxxxxxxxxxx PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences H-1525 Budapest 114, POB. 49, Hungary