Skip to content

Commit

Permalink
Remove unused variable from some functions (#35)
Browse files Browse the repository at this point in the history
Co-authored-by: Lorenz Kästle <[email protected]>
  • Loading branch information
RincewindsHat and Lorenz Kästle authored Mar 15, 2024
1 parent cb5072b commit 4aed654
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion check_interfaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ returncode_t print_output(struct configuration_struct *config, struct ifStruct *

if (config->oldperfdatap && config->oldperfdatap[0])
parse_perfdata(config->oldperfdatap, oldperfdata, config->prefix,
&parsed_lastcheck, config->mode, ifNumber, if_vars);
&parsed_lastcheck, ifNumber, if_vars);

if (config->lastcheck)
config->lastcheck = (starttime - config->lastcheck);
Expand Down
6 changes: 3 additions & 3 deletions snmp_bulkget.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ netsnmp_session *start_session_v3(netsnmp_session *session, char *user,
*/
int parse_perfdata(char *oldperfdatap, struct ifStruct *oldperfdata,
char *prefix, unsigned int *parsed_lastcheck,
enum mode_enum mode, int ifNumber,
int ifNumber,
char *perfdata_labels[]) {
char *last = 0, *last2 = 0, *word, *interface = 0, *var;
char *ptr;
Expand Down Expand Up @@ -375,7 +375,7 @@ int parse_perfdata(char *oldperfdatap, struct ifStruct *oldperfdata,
var = strtok_r(word, "=", &last2);

if (interface && var && valstr)
set_value(oldperfdata, interface, var, value, mode, ifNumber, perfdata_labels);
set_value(oldperfdata, interface, var, value, ifNumber, perfdata_labels);
}

return (0);
Expand All @@ -385,7 +385,7 @@ int parse_perfdata(char *oldperfdatap, struct ifStruct *oldperfdata,
* fill the ifStruct with values
*/
void set_value(struct ifStruct *oldperfdata, char *interface, char *var,
u64 value, enum mode_enum mode, int ifNumber, char *if_vars[]) {
u64 value, int ifNumber, char *if_vars[]) {
int i;

for (i = 0; i < ifNumber; i++) {
Expand Down
4 changes: 2 additions & 2 deletions snmp_bulkget.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ netsnmp_session *start_session_v3(netsnmp_session *, char *, char *, char *,
int session_retries);
int usage(char *);
int parse_perfdata(char *, struct ifStruct *, char *, unsigned int *,
enum mode_enum, int ifNumber, char *perfdata_lables[]);
void set_value(struct ifStruct *, char *, char *, u64, enum mode_enum, int ifNumber,
int ifNumber, char *perfdata_lables[]);
void set_value(struct ifStruct *, char *, char *, u64, int ifNumber,
char *if_vars[]);
int parseoids(int, char *, struct OIDStruct *);
int create_request(netsnmp_session *, struct OIDStruct **, char **, int,
Expand Down

0 comments on commit 4aed654

Please sign in to comment.