Code

Spent the day working on backwards compatability using getaddrinfo()
[nagiosplug.git] / plugins / check_udp.c
index 4ae9c1036319f96a732df3e401b6f7a4c16e7104..da9a142027e3e5876bbe052f8a4915fef34826a0 100644 (file)
@@ -74,9 +74,8 @@ main (int argc, char **argv)
        alarm (socket_timeout);
 
        time (&start_time);
-       result =
-               process_udp_request (server_address, server_port, server_send,
-                                                                                                recv_buffer, MAX_INPUT_BUFFER - 1);
+       result = process_udp_request (server_address, server_port, server_send,
+                       recv_buffer, MAX_INPUT_BUFFER - 1);
        time (&end_time);
 
        if (result != STATE_OK) {
@@ -125,7 +124,6 @@ process_arguments (int argc, char **argv)
 {
        int c;
 
-#ifdef HAVE_GETOPT_H
        int option_index = 0;
        static struct option long_options[] = {
                {"hostname", required_argument, 0, 'H'},
@@ -140,7 +138,6 @@ process_arguments (int argc, char **argv)
                {"help", no_argument, 0, 'h'},
                {0, 0, 0, 0}
        };
-#endif
 
        if (argc < 2)
                usage ("\n");
@@ -155,11 +152,7 @@ process_arguments (int argc, char **argv)
        }
 
        while (1) {
-#ifdef HAVE_GETOPT_H
-               c =     getopt_long (argc, argv, "+hVvH:e:s:c:w:t:p:", long_options, &option_index);
-#else
-               c = getopt (argc, argv, "+hVvH:e:s:c:w:t:p:");
-#endif
+               c = getopt_long (argc, argv, "+hVvH:e:s:c:w:t:p:", long_options, &option_index);
 
                if (c == -1 || c == EOF || c == 1)
                        break;