projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b972aa
)
Replace funny statement in para_next_signal() by readable code.
author
Andre Noll
<maan@systemlinux.org>
Tue, 18 Dec 2007 07:19:29 +0000
(08:19 +0100)
committer
Andre Noll
<maan@systemlinux.org>
Tue, 18 Dec 2007 07:19:29 +0000
(08:19 +0100)
This happened to be correct only by coincidence. Quoting Linus:
Assignments inside tests should probably be relegated entirely
to loop constructs, where doing them outside the test changes
semantics.
signal.c
patch
|
blob
|
history
diff --git
a/signal.c
b/signal.c
index
3d1883f
..
cc49da1
100644
(file)
--- a/
signal.c
+++ b/
signal.c
@@
-137,7
+137,8
@@
int para_next_signal(void)
int s;
ssize_t r;
- if ((r = read(signal_pipe[0], &s, sizeof(s)) == sizeof(s)) > 0) {
+ r = read(signal_pipe[0], &s, sizeof(s));
+ if (r == sizeof(s)) {
PARA_DEBUG_LOG("next signal: %d\n", s);
return s;
}