]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Inadvertent assignment in ? operator
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 2 Feb 2017 00:47:39 +0000 (19:47 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 2 Feb 2017 00:47:39 +0000 (19:47 -0500)
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>
lib/thread.c

index de7066bb820164437d34ba1a54b8e5782735dd29..28245d11a2a4bcbb68631ed671e0b3743d882384 100644 (file)
@@ -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;
     }