summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-02-23 10:54:59 +0100
committerVolker Lendecke <vl@samba.org>2008-02-23 10:54:59 +0100
commit9712e3c11c69e2a40ea7c156dd3515dafed833ea (patch)
tree1043f0e5c4a209e0169268f4d4dab012a8e8fab1
parent29d70de83c8406b9cd8b5ac9b32e49f48208ee90 (diff)
downloadsamba-9712e3c11c69e2a40ea7c156dd3515dafed833ea.tar.gz
samba-9712e3c11c69e2a40ea7c156dd3515dafed833ea.tar.bz2
samba-9712e3c11c69e2a40ea7c156dd3515dafed833ea.zip
make idl: Check return value of asprintf
(This used to be commit d9fb7d7bdcd0e54838ff0b1cb64a7e75d8cd726a)
-rw-r--r--source3/librpc/gen_ndr/ndr_dfs.c33
-rw-r--r--source3/librpc/gen_ndr/ndr_echo.c3
-rw-r--r--source3/librpc/gen_ndr/ndr_epmapper.c15
-rw-r--r--source3/librpc/gen_ndr/ndr_eventlog.c3
-rw-r--r--source3/librpc/gen_ndr/ndr_krb5pac.c6
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.c57
-rw-r--r--source3/librpc/gen_ndr/ndr_messaging.c3
-rw-r--r--source3/librpc/gen_ndr/ndr_netlogon.c78
-rw-r--r--source3/librpc/gen_ndr/ndr_notify.c6
-rw-r--r--source3/librpc/gen_ndr/ndr_ntsvcs.c3
-rw-r--r--source3/librpc/gen_ndr/ndr_samr.c36
-rw-r--r--source3/librpc/gen_ndr/ndr_security.c6
-rw-r--r--source3/librpc/gen_ndr/ndr_srvsvc.c84
-rw-r--r--source3/librpc/gen_ndr/ndr_unixinfo.c6
-rw-r--r--source3/librpc/gen_ndr/ndr_winreg.c6
-rw-r--r--source3/librpc/gen_ndr/ndr_wkssvc.c27
-rw-r--r--source3/librpc/gen_ndr/ndr_xattr.c3
17 files changed, 125 insertions, 250 deletions
diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c
index f5ce913bd2..2e9873e929 100644
--- a/source3/librpc/gen_ndr/ndr_dfs.c
+++ b/source3/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/source3/librpc/gen_ndr/ndr_echo.c b/source3/librpc/gen_ndr/ndr_echo.c
index 67ff0f2df4..340167cf73 100644
--- a/source3/librpc/gen_ndr/ndr_echo.c
+++ b/source3/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/source3/librpc/gen_ndr/ndr_epmapper.c b/source3/librpc/gen_ndr/ndr_epmapper.c
index 4f9422ea57..2e709e11e0 100644
--- a/source3/librpc/gen_ndr/ndr_epmapper.c
+++ b/source3/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/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c
index 1b58eb66b8..c5461d99ab 100644
--- a/source3/librpc/gen_ndr/ndr_eventlog.c
+++ b/source3/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/source3/librpc/gen_ndr/ndr_krb5pac.c b/source3/librpc/gen_ndr/ndr_krb5pac.c
index 82b7803f80..7c4dba0b0a 100644
--- a/source3/librpc/gen_ndr/ndr_krb5pac.c
+++ b/source3/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/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c
index dc4918a6d7..b54f43a353 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.c
+++ b/source3/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/source3/librpc/gen_ndr/ndr_messaging.c b/source3/librpc/gen_ndr/ndr_messaging.c
index 413421f770..db886316f1 100644
--- a/source3/librpc/gen_ndr/ndr_messaging.c
+++ b/source3/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/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c
index fb5c4603ee..4c46fb0735 100644
--- a/source3/librpc/gen_ndr/ndr_netlogon.c
+++ b/source3/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]);
free(idx_1);
}
@@ -2826,8 +2819,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_attribs_1=0;cntr_attribs_1<r->num_rids;cntr_attribs_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_attribs_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_attribs_1) != -1) {
ndr_print_uint32(ndr, "attribs", r->attribs[cntr_attribs_1]);
free(idx_1);
}
@@ -3143,8 +3135,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_eventauditoptions_1=0;cntr_eventauditoptions_1<r->maxauditeventcount + 1;cntr_eventauditoptions_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_eventauditoptions_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_eventauditoptions_1) != -1) {
ndr_print_uint32(ndr, "eventauditoptions", r->eventauditoptions[cntr_eventauditoptions_1]);
free(idx_1);
}
@@ -3285,8 +3276,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const c
ndr->depth++;
for (cntr_controller_names_1=0;cntr_controller_names_1<r->num_controllers;cntr_controller_names_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_controller_names_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_controller_names_1) != -1) {
ndr_print_lsa_String(ndr, "controller_names", &r->controller_names[cntr_controller_names_1]);
free(idx_1);
}
@@ -3484,8 +3474,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_privilege_attrib_1=0;cntr_privilege_attrib_1<r->privilege_entries;cntr_privilege_attrib_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_privilege_attrib_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_privilege_attrib_1) != -1) {
ndr_print_uint32(ndr, "privilege_attrib", r->privilege_attrib[cntr_privilege_attrib_1]);
free(idx_1);
}
@@ -3500,8 +3489,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_privilege_name_1=0;cntr_privilege_name_1<r->privilege_entries;cntr_privilege_name_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_privilege_name_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_privilege_name_1) != -1) {
ndr_print_lsa_String(ndr, "privilege_name", &r->privilege_name[cntr_privilege_name_1]);
free(idx_1);
}
@@ -5291,8 +5279,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_delta_enum_1=0;cntr_delta_enum_1<r->num_deltas;cntr_delta_enum_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_delta_enum_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_delta_enum_1) != -1) {
ndr_print_netr_DELTA_ENUM(ndr, "delta_enum", &r->delta_enum[cntr_delta_enum_1]);
free(idx_1);
}
@@ -6429,8 +6416,7 @@ _PUBLIC_ void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_data_1=0;cntr_data_1<r->length / 2;cntr_data_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_data_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_data_1) != -1) {
ndr_print_uint16(ndr, "data", r->data[cntr_data_1]);
free(idx_1);
}
@@ -6703,8 +6689,7 @@ _PUBLIC_ void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_unknown7_0=0;cntr_unknown7_0<4;cntr_unknown7_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_unknown7_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_unknown7_0) != -1) {
ndr_print_uint32(ndr, "unknown7", r->unknown7[cntr_unknown7_0]);
free(idx_0);
}
@@ -6941,8 +6926,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *
ndr->depth++;
for (cntr_unknown1_0=0;cntr_unknown1_0<4;cntr_unknown1_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_unknown1_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_unknown1_0) != -1) {
ndr_print_netr_BinaryString(ndr, "unknown1", &r->unknown1[cntr_unknown1_0]);
free(idx_0);
}
@@ -6952,8 +6936,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *
ndr->depth++;
for (cntr_unknown_0=0;cntr_unknown_0<4;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);
}
@@ -7051,8 +7034,7 @@ _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_trusts_1=0;cntr_trusts_1<r->num_trusts;cntr_trusts_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_trusts_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_trusts_1) != -1) {
ndr_print_netr_DomainTrustInfo(ndr, "trusts", &r->trusts[cntr_trusts_1]);
free(idx_1);
}
@@ -7064,8 +7046,7 @@ _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_unknown_0=0;cntr_unknown_0<14;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);
}
@@ -7329,8 +7310,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, co
ndr->depth++;
for (cntr_sitename_1=0;cntr_sitename_1<r->count;cntr_sitename_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sitename_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sitename_1) != -1) {
ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]);
free(idx_1);
}
@@ -7692,8 +7672,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char *
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_netr_DomainTrust(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -7820,8 +7799,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr,
ndr->depth++;
for (cntr_sitename_1=0;cntr_sitename_1<r->count;cntr_sitename_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sitename_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sitename_1) != -1) {
ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]);
free(idx_1);
}
@@ -7836,8 +7814,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr,
ndr->depth++;
for (cntr_subnetname_1=0;cntr_subnetname_1<r->count;cntr_subnetname_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_subnetname_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_subnetname_1) != -1) {
ndr_print_lsa_String(ndr, "subnetname", &r->subnetname[cntr_subnetname_1]);
free(idx_1);
}
@@ -7923,8 +7900,7 @@ _PUBLIC_ void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, cons
ndr->depth++;
for (cntr_sites_1=0;cntr_sites_1<r->num_sites;cntr_sites_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sites_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sites_1) != -1) {
ndr_print_lsa_String(ndr, "sites", &r->sites[cntr_sites_1]);
free(idx_1);
}
@@ -12712,8 +12688,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_addresses_1=0;cntr_addresses_1<r->in.count;cntr_addresses_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_addresses_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_addresses_1) != -1) {
ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]);
free(idx_1);
}
@@ -13256,8 +13231,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, con
ndr->depth++;
for (cntr_addresses_1=0;cntr_addresses_1<r->in.count;cntr_addresses_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_addresses_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_addresses_1) != -1) {
ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]);
free(idx_1);
}
diff --git a/source3/librpc/gen_ndr/ndr_notify.c b/source3/librpc/gen_ndr/ndr_notify.c
index 8abfdfdf92..195d421408 100644
--- a/source3/librpc/gen_ndr/ndr_notify.c
+++ b/source3/librpc/gen_ndr/ndr_notify.c
@@ -120,8 +120,7 @@ _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, co
ndr->depth++;
for (cntr_entries_0=0;cntr_entries_0<r->num_entries;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_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
free(idx_0);
}
@@ -184,8 +183,7 @@ _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, co
ndr->depth++;
for (cntr_depth_0=0;cntr_depth_0<r->num_depths;cntr_depth_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_depth_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_depth_0) != -1) {
ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]);
free(idx_0);
}
diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c
index 058b78104a..9a0e2bcf4f 100644
--- a/source3/librpc/gen_ndr/ndr_ntsvcs.c
+++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c
@@ -45,8 +45,7 @@ _PUBLIC_ void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_unknown2_0=0;cntr_unknown2_0<160;cntr_unknown2_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_unknown2_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_unknown2_0) != -1) {
ndr_print_uint16(ndr, "unknown2", r->unknown2[cntr_unknown2_0]);
free(idx_0);
}
diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c
index eaa38e3a1f..3549bfd22b 100644
--- a/source3/librpc/gen_ndr/ndr_samr.c
+++ b/source3/librpc/gen_ndr/ndr_samr.c
@@ -299,8 +299,7 @@ _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, c
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_samr_SamEntry(ndr, "entries", &r->entries[cntr_entries_1]);
free(idx_1);
}
@@ -1161,8 +1160,7 @@ _PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const
ndr->depth++;
for (cntr_ids_1=0;cntr_ids_1<r->count;cntr_ids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_ids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_ids_1) != -1) {
ndr_print_uint32(ndr, "ids", r->ids[cntr_ids_1]);
free(idx_1);
}
@@ -1559,8 +1557,7 @@ _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_rids_1=0;cntr_rids_1<r->count;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]);
free(idx_1);
}
@@ -1575,8 +1572,7 @@ _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_types_1=0;cntr_types_1<r->count;cntr_types_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_types_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_types_1) != -1) {
ndr_print_uint32(ndr, "types", r->types[cntr_types_1]);
free(idx_1);
}
@@ -3711,8 +3707,7 @@ _PUBLIC_ void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_rids_1=0;cntr_rids_1<r->count;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_samr_RidWithAttribute(ndr, "rids", &r->rids[cntr_rids_1]);
free(idx_1);
}
@@ -3849,8 +3844,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *
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_samr_DispEntryGeneral(ndr, "entries", &r->entries[cntr_entries_1]);
free(idx_1);
}
@@ -3982,8 +3976,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *nam
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_samr_DispEntryFull(ndr, "entries", &r->entries[cntr_entries_1]);
free(idx_1);
}
@@ -4115,8 +4108,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const cha
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_samr_DispEntryFullGroup(ndr, "entries", &r->entries[cntr_entries_1]);
free(idx_1);
}
@@ -4237,8 +4229,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *na
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_samr_DispEntryAscii(ndr, "entries", &r->entries[cntr_entries_1]);
free(idx_1);
}
@@ -4840,8 +4831,7 @@ _PUBLIC_ void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const c
ndr->depth++;
for (cntr_pwd_history_1=0;cntr_pwd_history_1<r->pwd_history_len;cntr_pwd_history_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_pwd_history_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_pwd_history_1) != -1) {
ndr_print_samr_ValidationBlob(ndr, "pwd_history", &r->pwd_history[cntr_pwd_history_1]);
free(idx_1);
}
@@ -7212,8 +7202,7 @@ _PUBLIC_ void ndr_print_samr_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);
}
@@ -7352,8 +7341,7 @@ _PUBLIC_ void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_rids_0=0;cntr_rids_0<r->in.num_rids;cntr_rids_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_rids_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) {
ndr_print_uint32(ndr, "rids", r->in.rids[cntr_rids_0]);
free(idx_0);
}
diff --git a/source3/librpc/gen_ndr/ndr_security.c b/source3/librpc/gen_ndr/ndr_security.c
index 8ab56dd914..cbeabf48e5 100644
--- a/source3/librpc/gen_ndr/ndr_security.c
+++ b/source3/librpc/gen_ndr/ndr_security.c
@@ -552,8 +552,7 @@ _PUBLIC_ void ndr_print_security_acl(struct ndr_print *ndr, const char *name, co
ndr->depth++;
for (cntr_aces_0=0;cntr_aces_0<r->num_aces;cntr_aces_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_aces_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_aces_0) != -1) {
ndr_print_security_ace(ndr, "aces", &r->aces[cntr_aces_0]);
free(idx_0);
}
@@ -981,8 +980,7 @@ _PUBLIC_ void ndr_print_security_token(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_sids_0=0;cntr_sids_0<r->num_sids;cntr_sids_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_sids_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_sids_0) != -1) {
ndr_print_ptr(ndr, "sids", r->sids[cntr_sids_0]);
ndr->depth++;
if (r->sids[cntr_sids_0]) {
diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.c b/source3/librpc/gen_ndr/ndr_srvsvc.c
index 86d47a856c..9b08ade4af 100644
--- a/source3/librpc/gen_ndr/ndr_srvsvc.c
+++ b/source3/librpc/gen_ndr/ndr_srvsvc.c
@@ -140,8 +140,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetCharDevInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -326,8 +325,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetCharDevInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -749,8 +747,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetCharDevQInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -938,8 +935,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetCharDevQInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -1325,8 +1321,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetConnInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -1520,8 +1515,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetConnInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -1769,8 +1763,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetFileInfo2(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -1958,8 +1951,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetFileInfo3(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -2381,8 +2373,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetSessInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -2573,8 +2564,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetSessInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -2798,8 +2788,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetSessInfo2(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -2984,8 +2973,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *n
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetSessInfo10(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -3242,8 +3230,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetSessInfo502(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -3694,8 +3681,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *n
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -3877,8 +3863,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *n
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4135,8 +4120,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *n
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo2(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4321,8 +4305,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo501(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4616,8 +4599,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo502(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4763,8 +4745,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo1004(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4897,8 +4878,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo1005(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -5008,8 +4988,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo1006(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -5158,8 +5137,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo1007(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -5245,8 +5223,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_sec_desc_buf(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -11487,8 +11464,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_disks_1=0;cntr_disks_1<r->count;cntr_disks_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_disks_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_disks_1) != -1) {
ndr_print_srvsvc_NetDiskInfo0(ndr, "disks", &r->disks[cntr_disks_1]);
free(idx_1);
}
@@ -11781,8 +11757,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -12030,8 +12005,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetTransportInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -12282,8 +12256,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetTransportInfo2(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -12540,8 +12513,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetTransportInfo3(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.c b/source3/librpc/gen_ndr/ndr_unixinfo.c
index 03a8d30f03..b0b5c81395 100644
--- a/source3/librpc/gen_ndr/ndr_unixinfo.c
+++ b/source3/librpc/gen_ndr/ndr_unixinfo.c
@@ -425,8 +425,7 @@ _PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_uids_0=0;cntr_uids_0<*r->in.count;cntr_uids_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_uids_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_uids_0) != -1) {
ndr_print_hyper(ndr, "uids", r->in.uids[cntr_uids_0]);
free(idx_0);
}
@@ -445,8 +444,7 @@ _PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_infos_0=0;cntr_infos_0<*r->out.count;cntr_infos_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_infos_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_infos_0) != -1) {
ndr_print_unixinfo_GetPWUidInfo(ndr, "infos", &r->out.infos[cntr_infos_0]);
free(idx_0);
}
diff --git a/source3/librpc/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c
index ed511a62db..cd16a141b0 100644
--- a/source3/librpc/gen_ndr/ndr_winreg.c
+++ b/source3/librpc/gen_ndr/ndr_winreg.c
@@ -3798,8 +3798,7 @@ _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_values_1=0;cntr_values_1<r->in.num_values;cntr_values_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_values_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) {
ndr_print_QueryMultipleValue(ndr, "values", &r->in.values[cntr_values_1]);
free(idx_1);
}
@@ -3828,8 +3827,7 @@ _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_values_1=0;cntr_values_1<r->in.num_values;cntr_values_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_values_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) {
ndr_print_QueryMultipleValue(ndr, "values", &r->out.values[cntr_values_1]);
free(idx_1);
}
diff --git a/source3/librpc/gen_ndr/ndr_wkssvc.c b/source3/librpc/gen_ndr/ndr_wkssvc.c
index 096c0b2c72..80ea67526e 100644
--- a/source3/librpc/gen_ndr/ndr_wkssvc.c
+++ b/source3/librpc/gen_ndr/ndr_wkssvc.c
@@ -3071,8 +3071,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_print *ndr, cons
ndr->depth++;
for (cntr_user0_1=0;cntr_user0_1<r->entries_read;cntr_user0_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_user0_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_user0_1) != -1) {
ndr_print_wkssvc_NetrWkstaUserInfo0(ndr, "user0", &r->user0[cntr_user0_1]);
free(idx_1);
}
@@ -3317,8 +3316,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_print *ndr, cons
ndr->depth++;
for (cntr_user1_1=0;cntr_user1_1<r->entries_read;cntr_user1_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_user1_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_user1_1) != -1) {
ndr_print_wkssvc_NetrWkstaUserInfo1(ndr, "user1", &r->user1[cntr_user1_1]);
free(idx_1);
}
@@ -3909,8 +3907,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr0(struct ndr_print *ndr, cons
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_wkssvc_NetWkstaTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4867,8 +4864,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr2(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_wkssvc_NetrUseInfo2(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4954,8 +4950,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr1(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_wkssvc_NetrUseInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -5041,8 +5036,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr0(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_wkssvc_NetrUseInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -5666,8 +5660,7 @@ _PUBLIC_ void ndr_print_wkssvc_ComputerNamesCtr(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_computer_name_1=0;cntr_computer_name_1<r->count;cntr_computer_name_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_computer_name_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_computer_name_1) != -1) {
ndr_print_lsa_String(ndr, "computer_name", &r->computer_name[cntr_computer_name_1]);
free(idx_1);
}
@@ -8836,8 +8829,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print *ndr, const c
ndr->depth++;
for (cntr_ous_2=0;cntr_ous_2<*r->out.num_ous;cntr_ous_2++) {
char *idx_2=NULL;
- asprintf(&idx_2, "[%d]", cntr_ous_2);
- if (idx_2) {
+ if (asprintf(&idx_2, "[%d]", cntr_ous_2) != -1) {
ndr_print_ptr(ndr, "ous", (*r->out.ous)[cntr_ous_2]);
ndr->depth++;
if ((*r->out.ous)[cntr_ous_2]) {
@@ -9757,8 +9749,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_ous_2=0;cntr_ous_2<*r->out.num_ous;cntr_ous_2++) {
char *idx_2=NULL;
- asprintf(&idx_2, "[%d]", cntr_ous_2);
- if (idx_2) {
+ if (asprintf(&idx_2, "[%d]", cntr_ous_2) != -1) {
ndr_print_ptr(ndr, "ous", (*r->out.ous)[cntr_ous_2]);
ndr->depth++;
if ((*r->out.ous)[cntr_ous_2]) {
diff --git a/source3/librpc/gen_ndr/ndr_xattr.c b/source3/librpc/gen_ndr/ndr_xattr.c
index 425ad814bf..46c4249d21 100644
--- a/source3/librpc/gen_ndr/ndr_xattr.c
+++ b/source3/librpc/gen_ndr/ndr_xattr.c
@@ -91,8 +91,7 @@ _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, cons
ndr->depth++;
for (cntr_xattrs_0=0;cntr_xattrs_0<r->num_xattrs;cntr_xattrs_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_xattrs_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_xattrs_0) != -1) {
ndr_print_tdb_xattr(ndr, "xattrs", &r->xattrs[cntr_xattrs_0]);
free(idx_0);
}