summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr/ndr_unixinfo.c
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 /source3/librpc/gen_ndr/ndr_unixinfo.c
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)
Diffstat (limited to 'source3/librpc/gen_ndr/ndr_unixinfo.c')
-rw-r--r--source3/librpc/gen_ndr/ndr_unixinfo.c6
1 files changed, 2 insertions, 4 deletions
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);
}