]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix an EOF-testing goof in winhandl.c.
authorSimon Tatham <anakin@pobox.com>
Fri, 3 Feb 2017 19:33:50 +0000 (19:33 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 3 Feb 2017 19:33:50 +0000 (19:33 +0000)
I was having a play with clang's MSVC compatibility mode, just to see
how much of PuTTY it could compile, and one of its warnings pointed
out this error which must have crept in when I was changing the EOF
flags in winhandl.c from booleans to three-state enums - I left the !
on the front of what was previously an if (!thing) and needed to turn
into if (thing == EOF_NO).

windows/winhandl.c

index e5a5e2d541aea5c00848bd8d314fd33a65f50636..cfd6298747e6f1805b087509ff8e56d50931a274 100644 (file)
@@ -533,7 +533,7 @@ void handle_write_eof(struct handle *h)
      * direction!
      */
     assert(h->type == HT_OUTPUT);
-    if (!h->u.o.outgoingeof == EOF_NO) {
+    if (h->u.o.outgoingeof == EOF_NO) {
         h->u.o.outgoingeof = EOF_PENDING;
         handle_try_output(&h->u.o);
     }