From 651471fda8df6b3190973a2f048b66448fe90a93 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 10 Feb 2010 10:57:14 -0800 Subject: [PATCH] process: Remove pointless, redundant assignments from stream_read(). Found by Clang (http://clang-analyzer.llvm.org/). --- lib/process.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/process.c b/lib/process.c index 3f66ddd9..3504dfb0 100644 --- a/lib/process.c +++ b/lib/process.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -415,15 +415,13 @@ stream_open(struct stream *s) static void stream_read(struct stream *s) { - int error = 0; - if (s->fds[0] < 0) { return; } - error = 0; for (;;) { char buffer[512]; + int error; size_t n; error = read_fully(s->fds[0], buffer, sizeof buffer, &n); -- 2.30.2