summaryrefslogtreecommitdiff
path: root/lib/thread.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-02-01 19:47:39 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-02-01 19:47:39 -0500
commit907ca8e4d50b03357654831590fa90a01f63d042 (patch)
tree001136763fbe6df009767187ecfc5884e971a359 /lib/thread.c
parenta1198921f21c18659174e0a534c27e0f6d51ec71 (diff)
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/thread.c')
-rw-r--r--lib/thread.c2
1 files changed, 1 insertions, 1 deletions
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;
}