Fix some signed/unsigned misbehaviors; add FAQ
[srvx.git] / src / proto-common.c
index 5a7a689ca2c5f639684b02c0c9aa9d9ba23523a4..6a042edbaa22a79ca2b7bf6fd014e4237d8fca5e 100644 (file)
@@ -81,7 +81,8 @@ uplink_readable(struct io_fd *fd) {
         close_socket();
         return;
     }
-    if ((eol = strpbrk(buffer, "\r\n"))) *eol = 0;
+    if ((eol = strpbrk(buffer, "\r\n")))
+        *eol = 0;
     log_replay(MAIN_LOG, false, buffer);
     if (cManager.uplink->state != DISCONNECTED)
         parse_line(buffer, 0);
@@ -95,7 +96,8 @@ socket_destroyed(struct io_fd *fd)
         log_module(MAIN_LOG, LOG_ERROR, "Connection to server lost.");
     socket_io_fd = NULL;
     cManager.uplink->state = DISCONNECTED;
-    if (self->uplink) DelServer(self->uplink, 0, NULL);
+    if (self->uplink)
+        DelServer(self->uplink, 0, NULL);
 }
 
 void replay_event_loop(void)