diff options
author | Sven Nierlein <sven@consol.de> | 2023-03-27 12:59:53 +0200 |
---|---|---|
committer | Sven Nierlein <sven@consol.de> | 2023-03-27 12:59:53 +0200 |
commit | 6e64973a4486248ff6c3de7d72637e44b6474c3e (patch) | |
tree | a9345578bf52530338d506712fbab702056d0a43 | |
parent | bf827000783f843ba1cde3e10fe2449e6e9e31fc (diff) | |
download | monitoring-plugins-6e64973.tar.gz |
simplify code
if statement is always true at this point, so remove it.
-rw-r--r-- | plugins/check_snmp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index c4ddd0ed..aefda3d2 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c | |||
@@ -1179,10 +1179,7 @@ multiply (char *str) | |||
1179 | 1179 | ||
1180 | val = strtod (str, &endptr); | 1180 | val = strtod (str, &endptr); |
1181 | if ((val == 0.0) && (endptr == str)) { | 1181 | if ((val == 0.0) && (endptr == str)) { |
1182 | if(multiplier != 1) { | 1182 | die(STATE_UNKNOWN, _("multiplier set (%.1f), but input is not a number: %s"), multiplier, str); |
1183 | die(STATE_UNKNOWN, _("multiplier set (%.1f), but input is not a number: %s"), multiplier, str); | ||
1184 | } | ||
1185 | return str; | ||
1186 | } | 1183 | } |
1187 | 1184 | ||
1188 | if(verbose>2) | 1185 | if(verbose>2) |