From: Ben Pfaff Date: Thu, 27 Nov 2008 00:18:16 +0000 (-0800) Subject: Simplify code in stream_recv(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca2e44b48d767d6c7c96df42b1a36d0dcf3309dc;p=openvswitch Simplify code in stream_recv(). There is no need to test whether retval is nonzero at this point in the code: we already know that it is negative from the two previous "if" branches. --- diff --git a/lib/vconn-stream.c b/lib/vconn-stream.c index 966c2420..0b852611 100644 --- a/lib/vconn-stream.c +++ b/lib/vconn-stream.c @@ -163,7 +163,7 @@ again: return EOF; } } else { - return retval ? errno : EAGAIN; + return errno; } }