diff options
| author | Ben Pfaff <blp@nicira.com> | 2010-02-10 10:57:14 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2010-02-11 10:35:28 -0800 |
| commit | 651471fda8df6b3190973a2f048b66448fe90a93 (patch) | |
| tree | 5df00d7afe3af49872eab92553dc6d4865608f47 /lib/process.c | |
| parent | f0f4410a47e20d5c6c8f0e56eb7c8a2a3248248c (diff) | |
| download | openvswitch-651471fda8df6b3190973a2f048b66448fe90a93.tar.gz | |
process: Remove pointless, redundant assignments from stream_read().
Found by Clang (http://clang-analyzer.llvm.org/).
Diffstat (limited to 'lib/process.c')
| -rw-r--r-- | lib/process.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/process.c b/lib/process.c index 3f66ddd91..3504dfb0d 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); |
