diff options
Diffstat (limited to 'source4/torture/raw')
-rw-r--r-- | source4/torture/raw/open.c | 12 | ||||
-rw-r--r-- | source4/torture/raw/search.c | 3 |
2 files changed, 7 insertions, 8 deletions
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c index 8cdc18fe2f..2cb39b3231 100644 --- a/source4/torture/raw/open.c +++ b/source4/torture/raw/open.c @@ -150,7 +150,7 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_fileinfo finfo; const char *fname = BASEDIR "\\torture_open.txt"; NTSTATUS status; - int fnum, fnum2; + int fnum = -1, fnum2; BOOL ret = True; printf("Checking RAW_OPEN_OPEN\n"); @@ -261,7 +261,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_fileinfo finfo; const char *fname = BASEDIR "\\torture_openx.txt"; NTSTATUS status; - int fnum, fnum2; + int fnum = -1, fnum2; BOOL ret = True; int i; struct { @@ -579,7 +579,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) const char *fname = BASEDIR "\\torture_ntcreatex.txt"; const char *dname = BASEDIR "\\torture_ntcreatex.dir"; NTSTATUS status; - int fnum; + int fnum = -1; BOOL ret = True; int i; struct { @@ -822,7 +822,7 @@ static BOOL test_mknew(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_open io; const char *fname = BASEDIR "\\torture_mknew.txt"; NTSTATUS status; - int fnum; + int fnum = -1; BOOL ret = True; time_t basetime = (time(NULL) + 3600*24*3) & ~1; union smb_fileinfo finfo; @@ -876,7 +876,7 @@ static BOOL test_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_open io; const char *fname = BASEDIR "\\torture_create.txt"; NTSTATUS status; - int fnum; + int fnum = -1; BOOL ret = True; time_t basetime = (time(NULL) + 3600*24*3) & ~1; union smb_fileinfo finfo; @@ -930,7 +930,7 @@ static BOOL test_ctemp(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) { union smb_open io; NTSTATUS status; - int fnum; + int fnum = -1; BOOL ret = True; time_t basetime = (time(NULL) + 3600*24*3) & ~1; union smb_fileinfo finfo; diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c index f1d51a8c69..19dfcc51d4 100644 --- a/source4/torture/raw/search.c +++ b/source4/torture/raw/search.c @@ -377,8 +377,7 @@ static BOOL multiple_search_callback(void *private, union smb_search_data *file) data->count++; - data->list = talloc_realloc(data->mem_ctx, - data->list, + data->list = talloc_realloc(data->list, data->count * (sizeof(data->list[0]))); data->list[data->count-1] = *file; |