Skip to content

Commit e2bfcd6

Browse files
committed
libnetconf2 REFACTOR unitialized variables
False positives.
1 parent 36300e7 commit e2bfcd6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/session_server_ssh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ nc_server_ssh_create_ssh_pubkey(const char *base64, ssh_key *key)
10941094
static int
10951095
auth_pubkey_compare_key(ssh_key key, struct nc_auth_client *auth_client)
10961096
{
1097-
uint16_t i, pubkey_count;
1097+
uint16_t i, pubkey_count = 0;
10981098
int ret = 0;
10991099
ssh_key new_key = NULL;
11001100
struct nc_public_key *pubkeys = NULL;

tests/test_client_ssh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ test_nc_client_ssh_adding_keypair(void **state)
370370
{
371371
(void)state;
372372
int ret;
373-
const char *pubkey1, *pubkey2;
373+
const char *pubkey1 = NULL, *pubkey2 = NULL;
374374

375375
/* at the beginning keypair count should be 0 */
376376
ret = nc_client_ssh_get_keypair_count();

0 commit comments

Comments
 (0)