Skip to content

Commit 024c65c

Browse files
committed
server config REFACTOR uninit vars
1 parent 50defb3 commit 024c65c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/server_config.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,7 @@ config_ssh_user(const struct lyd_node *node, enum nc_operation parent_op, struct
13591359
struct lyd_node *n;
13601360
struct nc_auth_client *user = NULL;
13611361
const char *name;
1362-
uint32_t i;
1362+
uint32_t i = 0;
13631363

13641364
NC_NODE_GET_OP(node, parent_op, &op);
13651365

@@ -2787,7 +2787,7 @@ config_cert_to_name(const struct lyd_node *node, enum nc_operation parent_op, st
27872787
struct lyd_node *n;
27882788
enum nc_operation op;
27892789
uint32_t id;
2790-
struct nc_ctn *ctn, *iter, *prev;
2790+
struct nc_ctn *ctn = NULL, *iter, *prev = NULL;
27912791

27922792
NC_NODE_GET_OP(node, parent_op, &op);
27932793

tests/ln2_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ ln2_glob_test_server_thread_fail(void *arg)
110110
/* try to accept a session, but we expect it to fail */
111111
msgtype = nc_accept(NC_ACCEPT_TIMEOUT, test_ctx->ctx, &session);
112112
assert(msgtype == NC_MSG_ERROR);
113+
(void)msgtype;
113114
assert(!session);
114115

115116
return NULL;

0 commit comments

Comments
 (0)