diff options
author | Volker Lendecke <vl@samba.org> | 2008-02-23 10:54:59 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-02-23 10:54:59 +0100 |
commit | 9712e3c11c69e2a40ea7c156dd3515dafed833ea (patch) | |
tree | 1043f0e5c4a209e0169268f4d4dab012a8e8fab1 /source3/librpc/gen_ndr/ndr_winreg.c | |
parent | 29d70de83c8406b9cd8b5ac9b32e49f48208ee90 (diff) | |
download | samba-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_winreg.c')
-rw-r--r-- | source3/librpc/gen_ndr/ndr_winreg.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); } |