1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s3/libsmd: clang: Fix some uninitialized value errors

Fixes:

source3/libsmb/clilist.c:534:14: warning: 1st function call argument is an uninitialized value <--[clang]
        num_finfo = talloc_array_length(finfo);
                    ^
source3/libsmb/clilist.c:1007:13: warning: The right operand of '<' is a garbage value <--[clang]
        for (i=0; i<num_finfo; i++) {
                   ^~~~~~~~~~
2 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Noel Power 2019-08-13 15:22:37 +01:00 committed by Ralph Boehme
parent e9dd8821ad
commit 7a4da41c1e

View File

@ -506,7 +506,7 @@ NTSTATUS cli_list_old(struct cli_state *cli, const char *mask,
struct tevent_context *ev;
struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY;
struct file_info *finfo;
struct file_info *finfo = NULL;
size_t i, num_finfo;
if (smbXcli_conn_has_async_calls(cli->conn)) {
@ -967,7 +967,7 @@ NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint16_t attribute,
struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY;
struct file_info *finfo;
size_t i, num_finfo;
size_t i, num_finfo = 0;
uint16_t info_level;
if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {