]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
cmdmon: tidy up declarations in read_from_cmd_socket()
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 26 Nov 2015 09:08:49 +0000 (10:08 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 26 Nov 2015 09:10:24 +0000 (10:10 +0100)
cmdmon.c

index a5b223d58bde1bb3412e2115d0ea9b842d6019db..af78a0057e47f7b0802a448ad810b59461b7af9d 100644 (file)
--- a/cmdmon.c
+++ b/cmdmon.c
@@ -1155,30 +1155,21 @@ handle_refresh(CMD_Request *rx_message, CMD_Reply *tx_message)
 static void
 read_from_cmd_socket(void *anything)
 {
-  int status;
-  int read_length; /* Length of packet read */
-  int expected_length; /* Expected length of packet without auth data */
-  unsigned long flags;
   CMD_Request rx_message;
   CMD_Reply tx_message;
-  int rx_message_length;
-  int sock_fd;
+  int status, read_length, expected_length, rx_message_length;
+  int localhost, allowed, sock_fd;
   union sockaddr_all where_from;
   socklen_t from_length;
   IPAddr remote_ip;
-  unsigned short remote_port;
-  int localhost;
-  int allowed;
-  unsigned short rx_command;
-  struct timeval now;
-  struct timeval cooked_now;
+  unsigned short remote_port, rx_command;
+  struct timeval now, cooked_now;
 
-  flags = 0;
   rx_message_length = sizeof(rx_message);
   from_length = sizeof(where_from);
 
   sock_fd = (long)anything;
-  status = recvfrom(sock_fd, (char *)&rx_message, rx_message_length, flags,
+  status = recvfrom(sock_fd, (char *)&rx_message, rx_message_length, 0,
                     &where_from.sa, &from_length);
 
   if (status < 0) {