diff options
author | Robin Sonefors <robin.sonefors@op5.com> | 2013-01-29 15:08:44 +0100 |
---|---|---|
committer | Robin Sonefors <robin.sonefors@op5.com> | 2013-01-29 15:30:04 +0100 |
commit | a20611d4357c3c3ebe0a62776a1642e7904c1410 (patch) | |
tree | 60a320d4a521bb3de4d556b618da0f17d3d05c0e /plugins/check_snmp.c | |
parent | d87395ec3d4bec777ab92fc74c8370877171259f (diff) | |
download | monitoring-plugins-a20611d4357c3c3ebe0a62776a1642e7904c1410.tar.gz |
check_snmp: Close potential for using uninitialized memory
This was reported by clang, and in order for it to understand attributes
properly, I had to modify the macro that checks for non-gcc compilers.
Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
Diffstat (limited to 'plugins/check_snmp.c')
-rw-r--r-- | plugins/check_snmp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 28354b0d..c73562ba 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -229,13 +229,14 @@ main (int argc, char **argv) np_set_args(argc, argv); + time(¤t_time); + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); if(calculate_rate) { if (!strcmp(label, "SNMP")) label = strdup("SNMP RATE"); - time(¤t_time); i=0; previous_state = np_state_read(); if(previous_state!=NULL) { |