Simplify code in stream_recv().
authorBen Pfaff <blp@nicira.com>
Thu, 27 Nov 2008 00:18:16 +0000 (16:18 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 27 Nov 2008 06:25:39 +0000 (22:25 -0800)
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.

lib/vconn-stream.c

index 966c242..0b85261 100644 (file)
@@ -163,7 +163,7 @@ again:
             return EOF;
         }
     } else {
-        return retval ? errno : EAGAIN;
+        return errno;
     }
 }