[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-2501-gd9fb7d7

Volker Lendecke vl at samba.org
Sat Feb 23 09:55:29 GMT 2008


The branch, v3-2-test has been updated
       via  d9fb7d7bdcd0e54838ff0b1cb64a7e75d8cd726a (commit)
      from  06d15d8a9f94a50337ebf6f651a004bb8b4821f3 (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit d9fb7d7bdcd0e54838ff0b1cb64a7e75d8cd726a
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Feb 23 10:54:59 2008 +0100

    make idl: Check return value of asprintf

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

Summary of changes:
 source/librpc/gen_ndr/ndr_dfs.c       |   33 ++++---------
 source/librpc/gen_ndr/ndr_echo.c      |    3 +-
 source/librpc/gen_ndr/ndr_epmapper.c  |   15 ++----
 source/librpc/gen_ndr/ndr_eventlog.c  |    3 +-
 source/librpc/gen_ndr/ndr_krb5pac.c   |    6 +--
 source/librpc/gen_ndr/ndr_lsa.c       |   57 +++++++---------------
 source/librpc/gen_ndr/ndr_messaging.c |    3 +-
 source/librpc/gen_ndr/ndr_netlogon.c  |   78 ++++++++++--------------------
 source/librpc/gen_ndr/ndr_notify.c    |    6 +--
 source/librpc/gen_ndr/ndr_ntsvcs.c    |    3 +-
 source/librpc/gen_ndr/ndr_samr.c      |   36 +++++---------
 source/librpc/gen_ndr/ndr_security.c  |    6 +--
 source/librpc/gen_ndr/ndr_srvsvc.c    |   84 +++++++++++----------------------
 source/librpc/gen_ndr/ndr_unixinfo.c  |    6 +--
 source/librpc/gen_ndr/ndr_winreg.c    |    6 +--
 source/librpc/gen_ndr/ndr_wkssvc.c    |   27 ++++-------
 source/librpc/gen_ndr/ndr_xattr.c     |    3 +-
 17 files changed, 125 insertions(+), 250 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/ndr_dfs.c b/source/librpc/gen_ndr/ndr_dfs.c
index f5ce913..2e9873e 100644
--- a/source/librpc/gen_ndr/ndr_dfs.c
+++ b/source/librpc/gen_ndr/ndr_dfs.c
@@ -506,8 +506,7 @@ _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const
 		ndr->depth++;
 		for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_stores_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
 				ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
 				free(idx_1);
 			}
@@ -670,8 +669,7 @@ _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const
 		ndr->depth++;
 		for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_stores_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
 				ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
 				free(idx_1);
 			}
@@ -1079,8 +1077,7 @@ _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const
 		ndr->depth++;
 		for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_stores_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
 				ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
 				free(idx_1);
 			}
@@ -2271,8 +2268,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name,
 		ndr->depth++;
 		for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_s_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
 				ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
 				free(idx_1);
 			}
@@ -2358,8 +2354,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name,
 		ndr->depth++;
 		for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_s_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
 				ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
 				free(idx_1);
 			}
@@ -2445,8 +2440,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name,
 		ndr->depth++;
 		for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_s_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
 				ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
 				free(idx_1);
 			}
@@ -2532,8 +2526,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name,
 		ndr->depth++;
 		for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_s_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
 				ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
 				free(idx_1);
 			}
@@ -2619,8 +2612,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name,
 		ndr->depth++;
 		for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_s_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
 				ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]);
 				free(idx_1);
 			}
@@ -2706,8 +2698,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name,
 		ndr->depth++;
 		for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_s_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
 				ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]);
 				free(idx_1);
 			}
@@ -2793,8 +2784,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name
 		ndr->depth++;
 		for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_s_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
 				ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
 				free(idx_1);
 			}
@@ -2880,8 +2870,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name
 		ndr->depth++;
 		for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_s_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
 				ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
 				free(idx_1);
 			}
diff --git a/source/librpc/gen_ndr/ndr_echo.c b/source/librpc/gen_ndr/ndr_echo.c
index 67ff0f2..340167c 100644
--- a/source/librpc/gen_ndr/ndr_echo.c
+++ b/source/librpc/gen_ndr/ndr_echo.c
@@ -627,8 +627,7 @@ _PUBLIC_ void ndr_print_echo_Surrounding(struct ndr_print *ndr, const char *name
 	ndr->depth++;
 	for (cntr_surrounding_0=0;cntr_surrounding_0<r->x;cntr_surrounding_0++) {
 		char *idx_0=NULL;
-		asprintf(&idx_0, "[%d]", cntr_surrounding_0);
-		if (idx_0) {
+		if (asprintf(&idx_0, "[%d]", cntr_surrounding_0) != -1) {
 			ndr_print_uint16(ndr, "surrounding", r->surrounding[cntr_surrounding_0]);
 			free(idx_0);
 		}
diff --git a/source/librpc/gen_ndr/ndr_epmapper.c b/source/librpc/gen_ndr/ndr_epmapper.c
index 4f9422e..2e709e1 100644
--- a/source/librpc/gen_ndr/ndr_epmapper.c
+++ b/source/librpc/gen_ndr/ndr_epmapper.c
@@ -1566,8 +1566,7 @@ _PUBLIC_ void ndr_print_epm_tower(struct ndr_print *ndr, const char *name, const
 		ndr->depth++;
 		for (cntr_floors_0=0;cntr_floors_0<r->num_floors;cntr_floors_0++) {
 			char *idx_0=NULL;
-			asprintf(&idx_0, "[%d]", cntr_floors_0);
-			if (idx_0) {
+			if (asprintf(&idx_0, "[%d]", cntr_floors_0) != -1) {
 				ndr_print_epm_floor(ndr, "floors", &r->floors[cntr_floors_0]);
 				free(idx_0);
 			}
@@ -1849,8 +1848,7 @@ _PUBLIC_ void ndr_print_epm_Insert(struct ndr_print *ndr, const char *name, int
 		ndr->depth++;
 		for (cntr_entries_0=0;cntr_entries_0<r->in.num_ents;cntr_entries_0++) {
 			char *idx_0=NULL;
-			asprintf(&idx_0, "[%d]", cntr_entries_0);
-			if (idx_0) {
+			if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
 				ndr_print_epm_entry_t(ndr, "entries", &r->in.entries[cntr_entries_0]);
 				free(idx_0);
 			}
@@ -1930,8 +1928,7 @@ _PUBLIC_ void ndr_print_epm_Delete(struct ndr_print *ndr, const char *name, int
 		ndr->depth++;
 		for (cntr_entries_0=0;cntr_entries_0<r->in.num_ents;cntr_entries_0++) {
 			char *idx_0=NULL;
-			asprintf(&idx_0, "[%d]", cntr_entries_0);
-			if (idx_0) {
+			if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
 				ndr_print_epm_entry_t(ndr, "entries", &r->in.entries[cntr_entries_0]);
 				free(idx_0);
 			}
@@ -2131,8 +2128,7 @@ _PUBLIC_ void ndr_print_epm_Lookup(struct ndr_print *ndr, const char *name, int
 		ndr->depth++;
 		for (cntr_entries_0=0;cntr_entries_0<*r->out.num_ents;cntr_entries_0++) {
 			char *idx_0=NULL;
-			asprintf(&idx_0, "[%d]", cntr_entries_0);
-			if (idx_0) {
+			if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
 				ndr_print_epm_entry_t(ndr, "entries", &r->out.entries[cntr_entries_0]);
 				free(idx_0);
 			}
@@ -2321,8 +2317,7 @@ _PUBLIC_ void ndr_print_epm_Map(struct ndr_print *ndr, const char *name, int fla
 		ndr->depth++;
 		for (cntr_towers_0=0;cntr_towers_0<*r->out.num_towers;cntr_towers_0++) {
 			char *idx_0=NULL;
-			asprintf(&idx_0, "[%d]", cntr_towers_0);
-			if (idx_0) {
+			if (asprintf(&idx_0, "[%d]", cntr_towers_0) != -1) {
 				ndr_print_epm_twr_p_t(ndr, "towers", &r->out.towers[cntr_towers_0]);
 				free(idx_0);
 			}
diff --git a/source/librpc/gen_ndr/ndr_eventlog.c b/source/librpc/gen_ndr/ndr_eventlog.c
index 1b58eb6..c5461d9 100644
--- a/source/librpc/gen_ndr/ndr_eventlog.c
+++ b/source/librpc/gen_ndr/ndr_eventlog.c
@@ -176,8 +176,7 @@ _PUBLIC_ void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name,
 	ndr->depth++;
 	for (cntr_strings_0=0;cntr_strings_0<r->num_of_strings;cntr_strings_0++) {
 		char *idx_0=NULL;
-		asprintf(&idx_0, "[%d]", cntr_strings_0);
-		if (idx_0) {
+		if (asprintf(&idx_0, "[%d]", cntr_strings_0) != -1) {
 			ndr_print_string(ndr, "strings", r->strings[cntr_strings_0]);
 			free(idx_0);
 		}
diff --git a/source/librpc/gen_ndr/ndr_krb5pac.c b/source/librpc/gen_ndr/ndr_krb5pac.c
index 82b7803..7c4dba0 100644
--- a/source/librpc/gen_ndr/ndr_krb5pac.c
+++ b/source/librpc/gen_ndr/ndr_krb5pac.c
@@ -442,8 +442,7 @@ _PUBLIC_ void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const
 	ndr->depth++;
 	for (cntr_buffers_0=0;cntr_buffers_0<r->num_buffers;cntr_buffers_0++) {
 		char *idx_0=NULL;
-		asprintf(&idx_0, "[%d]", cntr_buffers_0);
-		if (idx_0) {
+		if (asprintf(&idx_0, "[%d]", cntr_buffers_0) != -1) {
 			ndr_print_PAC_BUFFER(ndr, "buffers", &r->buffers[cntr_buffers_0]);
 			free(idx_0);
 		}
@@ -645,8 +644,7 @@ _PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, co
 	ndr->depth++;
 	for (cntr_buffers_0=0;cntr_buffers_0<r->num_buffers;cntr_buffers_0++) {
 		char *idx_0=NULL;
-		asprintf(&idx_0, "[%d]", cntr_buffers_0);
-		if (idx_0) {
+		if (asprintf(&idx_0, "[%d]", cntr_buffers_0) != -1) {
 			ndr_print_PAC_BUFFER_RAW(ndr, "buffers", &r->buffers[cntr_buffers_0]);
 			free(idx_0);
 		}
diff --git a/source/librpc/gen_ndr/ndr_lsa.c b/source/librpc/gen_ndr/ndr_lsa.c
index dc4918a..b54f43a 100644
--- a/source/librpc/gen_ndr/ndr_lsa.c
+++ b/source/librpc/gen_ndr/ndr_lsa.c
@@ -221,8 +221,7 @@ _PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, con
 		ndr->depth++;
 		for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_names_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
 				ndr_print_lsa_String(ndr, "names", &r->names[cntr_names_1]);
 				free(idx_1);
 			}
@@ -453,8 +452,7 @@ _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, c
 		ndr->depth++;
 		for (cntr_privs_1=0;cntr_privs_1<r->count;cntr_privs_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_privs_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_privs_1) != -1) {
 				ndr_print_lsa_PrivEntry(ndr, "privs", &r->privs[cntr_privs_1]);
 				free(idx_1);
 			}
@@ -789,8 +787,7 @@ _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *n
 		ndr->depth++;
 		for (cntr_settings_1=0;cntr_settings_1<r->count;cntr_settings_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_settings_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_settings_1) != -1) {
 				ndr_print_lsa_PolicyAuditPolicy(ndr, "settings", r->settings[cntr_settings_1]);
 				free(idx_1);
 			}
@@ -1622,8 +1619,7 @@ _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, co
 		ndr->depth++;
 		for (cntr_sids_1=0;cntr_sids_1<r->num_sids;cntr_sids_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_sids_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
 				ndr_print_lsa_SidPtr(ndr, "sids", &r->sids[cntr_sids_1]);
 				free(idx_1);
 			}
@@ -1709,8 +1705,7 @@ _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name,
 		ndr->depth++;
 		for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_domains_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
 				ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
 				free(idx_1);
 			}
@@ -1862,8 +1857,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *nam
 		ndr->depth++;
 		for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_sids_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
 				ndr_print_lsa_TranslatedSid(ndr, "sids", &r->sids[cntr_sids_1]);
 				free(idx_1);
 			}
@@ -1954,8 +1948,7 @@ _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *nam
 		ndr->depth++;
 		for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_domains_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
 				ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
 				free(idx_1);
 			}
@@ -2112,8 +2105,7 @@ _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *na
 		ndr->depth++;
 		for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_names_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
 				ndr_print_lsa_TranslatedName(ndr, "names", &r->names[cntr_names_1]);
 				free(idx_1);
 			}
@@ -2213,8 +2205,7 @@ _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name
 	ndr->depth++;
 	for (cntr_set_0=0;cntr_set_0<r->count;cntr_set_0++) {
 		char *idx_0=NULL;
-		asprintf(&idx_0, "[%d]", cntr_set_0);
-		if (idx_0) {
+		if (asprintf(&idx_0, "[%d]", cntr_set_0) != -1) {
 			ndr_print_lsa_LUIDAttribute(ndr, "set", &r->set[cntr_set_0]);
 			free(idx_0);
 		}
@@ -3335,8 +3326,7 @@ _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, co
 		ndr->depth++;
 		for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_names_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
 				ndr_print_lsa_StringLarge(ndr, "names", &r->names[cntr_names_1]);
 				free(idx_1);
 			}
@@ -3422,8 +3412,7 @@ _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name
 		ndr->depth++;
 		for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_domains_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
 				ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "domains", &r->domains[cntr_domains_1]);
 				free(idx_1);
 			}
@@ -3751,8 +3740,7 @@ _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *n
 		ndr->depth++;
 		for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_names_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
 				ndr_print_lsa_TranslatedName2(ndr, "names", &r->names[cntr_names_1]);
 				free(idx_1);
 			}
@@ -3874,8 +3862,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *na
 		ndr->depth++;
 		for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_sids_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
 				ndr_print_lsa_TranslatedSid2(ndr, "sids", &r->sids[cntr_sids_1]);
 				free(idx_1);
 			}
@@ -4024,8 +4011,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *na
 		ndr->depth++;
 		for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_sids_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
 				ndr_print_lsa_TranslatedSid3(ndr, "sids", &r->sids[cntr_sids_1]);
 				free(idx_1);
 			}
@@ -4447,8 +4433,7 @@ _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const
 		ndr->depth++;
 		for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_entries_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
 				ndr_print_ptr(ndr, "entries", r->entries[cntr_entries_1]);
 				ndr->depth++;
 				if (r->entries[cntr_entries_1]) {
@@ -5842,8 +5827,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name,
 		ndr->depth++;
 		for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
 			char *idx_0=NULL;
-			asprintf(&idx_0, "[%d]", cntr_names_0);
-			if (idx_0) {
+			if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
 				ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
 				free(idx_0);
 			}
@@ -10068,8 +10052,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name
 		ndr->depth++;
 		for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
 			char *idx_0=NULL;
-			asprintf(&idx_0, "[%d]", cntr_names_0);
-			if (idx_0) {
+			if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
 				ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
 				free(idx_0);
 			}
@@ -10652,8 +10635,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name
 		ndr->depth++;
 		for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
 			char *idx_0=NULL;
-			asprintf(&idx_0, "[%d]", cntr_names_0);
-			if (idx_0) {
+			if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
 				ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
 				free(idx_0);
 			}
@@ -11387,8 +11369,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name
 		ndr->depth++;
 		for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
 			char *idx_0=NULL;
-			asprintf(&idx_0, "[%d]", cntr_names_0);
-			if (idx_0) {
+			if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
 				ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
 				free(idx_0);
 			}
diff --git a/source/librpc/gen_ndr/ndr_messaging.c b/source/librpc/gen_ndr/ndr_messaging.c
index 413421f..db88631 100644
--- a/source/librpc/gen_ndr/ndr_messaging.c
+++ b/source/librpc/gen_ndr/ndr_messaging.c
@@ -103,8 +103,7 @@ _PUBLIC_ void ndr_print_messaging_array(struct ndr_print *ndr, const char *name,
 	ndr->depth++;
 	for (cntr_messages_0=0;cntr_messages_0<r->num_messages;cntr_messages_0++) {
 		char *idx_0=NULL;
-		asprintf(&idx_0, "[%d]", cntr_messages_0);
-		if (idx_0) {
+		if (asprintf(&idx_0, "[%d]", cntr_messages_0) != -1) {
 			ndr_print_messaging_rec(ndr, "messages", &r->messages[cntr_messages_0]);
 			free(idx_0);
 		}
diff --git a/source/librpc/gen_ndr/ndr_netlogon.c b/source/librpc/gen_ndr/ndr_netlogon.c
index fb5c460..4c46fb0 100644
--- a/source/librpc/gen_ndr/ndr_netlogon.c
+++ b/source/librpc/gen_ndr/ndr_netlogon.c
@@ -315,8 +315,7 @@ _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name
 		ndr->depth++;
 		for (cntr_bindata_1=0;cntr_bindata_1<r->length / 2;cntr_bindata_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_bindata_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_bindata_1) != -1) {
 				ndr_print_uint16(ndr, "bindata", r->bindata[cntr_bindata_1]);
 				free(idx_1);
 			}
@@ -1111,8 +1110,7 @@ _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name
 	ndr->depth++;
 	for (cntr_unknown_0=0;cntr_unknown_0<7;cntr_unknown_0++) {
 		char *idx_0=NULL;
-		asprintf(&idx_0, "[%d]", cntr_unknown_0);
-		if (idx_0) {
+		if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) {
 			ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]);
 			free(idx_0);
 		}
@@ -1287,8 +1285,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, c
 		ndr->depth++;
 		for (cntr_sids_1=0;cntr_sids_1<r->sidcount;cntr_sids_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_sids_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
 				ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
 				free(idx_1);
 			}
@@ -1396,8 +1393,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, c
 		ndr->depth++;
 		for (cntr_sids_1=0;cntr_sids_1<r->sidcount;cntr_sids_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_sids_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
 				ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
 				free(idx_1);
 			}
@@ -1411,8 +1407,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, c
 	ndr->depth++;
 	for (cntr_unknown4_0=0;cntr_unknown4_0<20;cntr_unknown4_0++) {
 		char *idx_0=NULL;
-		asprintf(&idx_0, "[%d]", cntr_unknown4_0);
-		if (idx_0) {
+		if (asprintf(&idx_0, "[%d]", cntr_unknown4_0) != -1) {
 			ndr_print_uint32(ndr, "unknown4", r->unknown4[cntr_unknown4_0]);
 			free(idx_0);
 		}
@@ -1558,8 +1553,7 @@ _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, co
 	ndr->depth++;
 	for (cntr_expansionroom_0=0;cntr_expansionroom_0<10;cntr_expansionroom_0++) {
 		char *idx_0=NULL;
-		asprintf(&idx_0, "[%d]", cntr_expansionroom_0);
-		if (idx_0) {
+		if (asprintf(&idx_0, "[%d]", cntr_expansionroom_0) != -1) {
 			ndr_print_uint32(ndr, "expansionroom", r->expansionroom[cntr_expansionroom_0]);
 			free(idx_0);
 		}
@@ -2810,8 +2804,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const cha
 		ndr->depth++;
 		for (cntr_rids_1=0;cntr_rids_1<r->num_rids;cntr_rids_1++) {
 			char *idx_1=NULL;
-			asprintf(&idx_1, "[%d]", cntr_rids_1);
-			if (idx_1) {
+			if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) {
 				ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list