From: Donald Sharp Date: Thu, 2 Feb 2017 00:47:39 +0000 (-0500) Subject: lib: Inadvertent assignment in ? operator X-Git-Tag: frr-3.0-branchpoint~51^2~8 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=907ca8e4d50b03357654831590fa90a01f63d042;p=matthieu%2Ffrr.git lib: Inadvertent assignment in ? operator In the case where we are using select as the operator *and* we call funcname_thread_add_read_write *and* the fd is already set, we would overwrite the read/write direction to always be READ. Clearly this was a bad idea. Signed-off-by: Donald Sharp --- diff --git a/lib/thread.c b/lib/thread.c index de7066bb82..28245d11a2 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -719,7 +719,7 @@ funcname_thread_add_read_write (int dir, struct thread_master *m, #else if (FD_ISSET (fd, fdset)) { - zlog (NULL, LOG_WARNING, "There is already %s fd [%d]", (dir = THREAD_READ) ? "read" : "write", fd); + zlog (NULL, LOG_WARNING, "There is already %s fd [%d]", (dir == THREAD_READ) ? "read" : "write", fd); return NULL; }