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 966c242026934007cbae1e56a508ecd3bcbcda2b..0b8526110fea6cb30a9ca5656702d673026b1f39 100644 (file)
@@ -163,7 +163,7 @@ again:
             return EOF;
         }
     } else {
-        return retval ? errno : EAGAIN;
+        return errno;
     }
 }