[SCM] Samba Shared Repository - branch master updated - 29c9b88e2bb5d3f585e7aa591870e8b39a0d23c9

Jeremy Allison jra at samba.org
Mon Oct 20 23:39:44 GMT 2008


The branch, master has been updated
       via  29c9b88e2bb5d3f585e7aa591870e8b39a0d23c9 (commit)
       via  6aba3516769b944e7960d27f10799bb8a8898d2d (commit)
      from  cefe4c66970b8ca243595cdb940a7c1a26765a08 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 29c9b88e2bb5d3f585e7aa591870e8b39a0d23c9
Merge: 6aba3516769b944e7960d27f10799bb8a8898d2d cefe4c66970b8ca243595cdb940a7c1a26765a08
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Oct 20 16:38:25 2008 -0700

    Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba

commit 6aba3516769b944e7960d27f10799bb8a8898d2d
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Oct 20 16:34:56 2008 -0700

    Fix warnings.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/netapi/tests/netfile.c       |   22 ++++++++++++----------
 source3/lib/netapi/tests/netgroup.c      |   10 +++++-----
 source3/lib/netapi/tests/netlocalgroup.c |    6 +++---
 source3/lib/netapi/tests/netshare.c      |    8 ++++----
 source3/lib/netapi/tests/netuser.c       |   20 ++++++++++----------
 5 files changed, 34 insertions(+), 32 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/tests/netfile.c b/source3/lib/netapi/tests/netfile.c
index 36ee828..bee3c2e 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
diff --git a/source3/lib/netapi/tests/netgroup.c b/source3/lib/netapi/tests/netgroup.c
index a89a772..51a21b3 100644
--- a/source3/lib/netapi/tests/netgroup.c
+++ b/source3/lib/netapi/tests/netgroup.c
@@ -36,14 +36,14 @@ static NET_API_STATUS test_netgroupenum(const char *hostname,
 	uint32_t total_entries = 0;
 	uint32_t resume_handle = 0;
 	int found_group = 0;
-	const char *current_name;
+	const char *current_name = NULL;
 	uint8_t *buffer = NULL;
 	int i;
 
-	struct GROUP_INFO_0 *info0;
-	struct GROUP_INFO_1 *info1;
-	struct GROUP_INFO_2 *info2;
-	struct GROUP_INFO_3 *info3;
+	struct GROUP_INFO_0 *info0 = NULL;
+	struct GROUP_INFO_1 *info1 = NULL;
+	struct GROUP_INFO_2 *info2 = NULL;
+	struct GROUP_INFO_3 *info3 = NULL;
 
 	printf("testing NetGroupEnum level %d\n", level);
 
diff --git a/source3/lib/netapi/tests/netlocalgroup.c b/source3/lib/netapi/tests/netlocalgroup.c
index 0d82059..76c59c8 100644
--- a/source3/lib/netapi/tests/netlocalgroup.c
+++ b/source3/lib/netapi/tests/netlocalgroup.c
@@ -36,12 +36,12 @@ static NET_API_STATUS test_netlocalgroupenum(const char *hostname,
 	uint32_t total_entries = 0;
 	uint32_t resume_handle = 0;
 	int found_group = 0;
-	const char *current_name;
+	const char *current_name = NULL;
 	uint8_t *buffer = NULL;
 	int i;
 
-	struct LOCALGROUP_INFO_0 *info0;
-	struct LOCALGROUP_INFO_1 *info1;
+	struct LOCALGROUP_INFO_0 *info0 = NULL;
+	struct LOCALGROUP_INFO_1 *info1 = NULL;
 
 	printf("testing NetLocalGroupEnum level %d\n", level);
 
diff --git a/source3/lib/netapi/tests/netshare.c b/source3/lib/netapi/tests/netshare.c
index 9446c30..84af9e0 100644
--- a/source3/lib/netapi/tests/netshare.c
+++ b/source3/lib/netapi/tests/netshare.c
@@ -36,13 +36,13 @@ static NET_API_STATUS test_netshareenum(const char *hostname,
 	uint32_t total_entries = 0;
 	uint32_t resume_handle = 0;
 	int found_share = 0;
-	const char *current_name;
+	const char *current_name = NULL;
 	uint8_t *buffer = NULL;
 	int i;
 
-	struct SHARE_INFO_0 *i0;
-	struct SHARE_INFO_1 *i1;
-	struct SHARE_INFO_2 *i2;
+	struct SHARE_INFO_0 *i0 = NULL;
+	struct SHARE_INFO_1 *i1 = NULL;
+	struct SHARE_INFO_2 *i2 = NULL;
 
 	printf("testing NetShareEnum level %d\n", level);
 
diff --git a/source3/lib/netapi/tests/netuser.c b/source3/lib/netapi/tests/netuser.c
index f1622e4..7bbc5ca 100644
--- a/source3/lib/netapi/tests/netuser.c
+++ b/source3/lib/netapi/tests/netuser.c
@@ -35,20 +35,20 @@ static NET_API_STATUS test_netuserenum(const char *hostname,
 	uint32_t entries_read = 0;
 	uint32_t total_entries = 0;
 	uint32_t resume_handle = 0;
-	const char *current_name;
+	const char *current_name = NULL;
 	int found_user = 0;
 	uint8_t *buffer = NULL;
 	int i;
 
-	struct USER_INFO_0 *info0;
-	struct USER_INFO_1 *info1;
-	struct USER_INFO_2 *info2;
-	struct USER_INFO_3 *info3;
-	struct USER_INFO_4 *info4;
-	struct USER_INFO_10 *info10;
-	struct USER_INFO_11 *info11;
-	struct USER_INFO_20 *info20;
-	struct USER_INFO_23 *info23;
+	struct USER_INFO_0 *info0 = NULL;
+	struct USER_INFO_1 *info1 = NULL;
+	struct USER_INFO_2 *info2 = NULL;
+	struct USER_INFO_3 *info3 = NULL;
+	struct USER_INFO_4 *info4 = NULL;
+	struct USER_INFO_10 *info10 = NULL;
+	struct USER_INFO_11 *info11 = NULL;
+	struct USER_INFO_20 *info20 = NULL;
+	struct USER_INFO_23 *info23 = NULL;
 
 	printf("testing NetUserEnum level %d\n", level);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list