src/main.c
changeset 54 e21f837e2b13
parent 49 59b09b0aeb96
--- a/src/main.c
+++ b/src/main.c
@@ -93,10 +93,7 @@
             fprintf (message.stream, "TOPIC %s :%s\r\n", uc.channel, uc.topic);
     }
 
-    while (!feof (message.stream)) {
-        if (fgets (buf, sizeof (buf), message.stream) == NULL)
-            break;
-
+    while (fgets (buf, sizeof (buf), message.stream) != NULL) {
         if (!active)            /* the bot was killed with SIGTERM */
             break;