diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-01-30 19:51:46 +0100 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-01-30 19:51:46 +0100 |
commit | 4a2a7254653476c8baae583101bc50451de9431b (patch) | |
tree | 9c1eb7c2145bf36caa35ffcd56e65b39402bab82 | |
parent | e33ecc84c7ebdf4af3e8649a326e8a5acc9fe5b6 (diff) | |
download | monitoring-plugins-4a2a7254653476c8baae583101bc50451de9431b.tar.gz |
check_dig: Declare variable at the top
C89 doesn't allow variable declarations to be intermingled with code.
-rw-r--r-- | plugins/check_dig.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c index 8c3fe6b8..d9481f2d 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c | |||
@@ -74,6 +74,7 @@ main (int argc, char **argv) | |||
74 | long microsec; | 74 | long microsec; |
75 | double elapsed_time; | 75 | double elapsed_time; |
76 | int result = STATE_UNKNOWN; | 76 | int result = STATE_UNKNOWN; |
77 | int timeout_interval_dig; | ||
77 | 78 | ||
78 | setlocale (LC_ALL, ""); | 79 | setlocale (LC_ALL, ""); |
79 | bindtextdomain (PACKAGE, LOCALEDIR); | 80 | bindtextdomain (PACKAGE, LOCALEDIR); |
@@ -90,7 +91,7 @@ main (int argc, char **argv) | |||
90 | usage_va(_("Could not parse arguments")); | 91 | usage_va(_("Could not parse arguments")); |
91 | 92 | ||
92 | /* dig applies the timeout to each try, so we need to work around this */ | 93 | /* dig applies the timeout to each try, so we need to work around this */ |
93 | int timeout_interval_dig = timeout_interval / number_tries + number_tries; | 94 | timeout_interval_dig = timeout_interval / number_tries + number_tries; |
94 | 95 | ||
95 | /* get the command to run */ | 96 | /* get the command to run */ |
96 | xasprintf (&command_line, "%s @%s -p %d %s -t %s %s %s +tries=%d +time=%d", | 97 | xasprintf (&command_line, "%s @%s -p %d %s -t %s %s %s +tries=%d +time=%d", |