occtl: fixed issues with unused variables

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
Nikos Mavrogiannopoulos
2020-07-11 12:55:43 +02:00
parent 541bf6f137
commit dc042ec327
3 changed files with 4 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ int err;
}
if ((err = nl_connect(sock, NETLINK_ROUTE)) < 0) {
fprintf(stderr, "nl: error in nl_connect");
fprintf(stderr, "nl: error in nl_connect (%d)", err);
goto error;
}

View File

@@ -286,7 +286,7 @@ unsigned check_cmd(const char *cmd, const char *input,
{
char *t, *p;
unsigned len, tlen;
unsigned i, j, ret = 0;
unsigned i, ret = 0;
char prev;
while (whitespace(*input))
@@ -300,7 +300,7 @@ unsigned check_cmd(const char *cmd, const char *input,
prev = 0;
p = t;
for (i = j = 0; i < len; i++) {
for (i = 0; i < len; i++) {
if (!whitespace(prev) || !whitespace(input[i])) {
*p = input[i];
prev = input[i];

View File

@@ -1210,7 +1210,7 @@ int common_info_cmd(UserListRep * args, FILE *out, cmd_params_st *params)
print_single_value(out, params, "Routes", "defaultroute", 1);
}
if ((r = print_list_entries(out, params, "No-routes", args->user[i]->no_routes, args->user[i]->n_no_routes, 1)) < 0)
if (print_list_entries(out, params, "No-routes", args->user[i]->no_routes, args->user[i]->n_no_routes, 1) < 0)
goto error_parse;
if (print_list_entries(out, params, "iRoutes", args->user[i]->iroutes, args->user[i]->n_iroutes, 1) < 0)