diff options
author | Jeremy Allison <jra@samba.org> | 2008-10-20 16:34:56 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-10-20 16:34:56 -0700 |
commit | 6aba3516769b944e7960d27f10799bb8a8898d2d (patch) | |
tree | 81eb1f4d5b4974c679daac90fba1d72a331f12aa /source3/lib/netapi/tests/netfile.c | |
parent | e08e5a0f3fa58a08532bb6d9a613985305e31c4f (diff) | |
download | samba-6aba3516769b944e7960d27f10799bb8a8898d2d.tar.gz samba-6aba3516769b944e7960d27f10799bb8a8898d2d.tar.bz2 samba-6aba3516769b944e7960d27f10799bb8a8898d2d.zip |
Fix warnings.
Jeremy.
Diffstat (limited to 'source3/lib/netapi/tests/netfile.c')
-rw-r--r-- | source3/lib/netapi/tests/netfile.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/source3/lib/netapi/tests/netfile.c b/source3/lib/netapi/tests/netfile.c index 36ee8288ee..bee3c2ed5e 100644 --- a/source3/lib/netapi/tests/netfile.c +++ b/source3/lib/netapi/tests/netfile.c @@ -37,8 +37,8 @@ static NET_API_STATUS test_netfileenum(const char *hostname, uint8_t *buffer = NULL; int i; - struct FILE_INFO_2 *i2; - struct FILE_INFO_3 *i3; + struct FILE_INFO_2 *i2 = NULL; + struct FILE_INFO_3 *i3 = NULL; printf("testing NetFileEnum level %d\n", level); @@ -98,8 +98,6 @@ NET_API_STATUS netapitest_file(struct libnetapi_ctx *ctx, const char *hostname) { NET_API_STATUS status = 0; - uint8_t *buffer = NULL; - uint32_t levels[] = { 2, 3 }; uint32_t enum_levels[] = { 2, 3 }; int i; @@ -118,14 +116,18 @@ NET_API_STATUS netapitest_file(struct libnetapi_ctx *ctx, /* basic queries */ #if 0 - for (i=0; i<ARRAY_SIZE(levels); i++) { + { + uint32_t levels[] = { 2, 3 }; + for (i=0; i<ARRAY_SIZE(levels); i++) { + uint8_t *buffer = NULL; - printf("testing NetFileGetInfo level %d\n", levels[i]); + printf("testing NetFileGetInfo level %d\n", levels[i]); - status = NetFileGetInfo(hostname, fid, levels[i], &buffer); - if (status && status != 124) { - NETAPI_STATUS(ctx, status, "NetFileGetInfo"); - goto out; + status = NetFileGetInfo(hostname, fid, levels[i], &buffer); + if (status && status != 124) { + NETAPI_STATUS(ctx, status, "NetFileGetInfo"); + goto out; + } } } #endif |