summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-02-23 10:26:52 +0100
committerVolker Lendecke <vl@samba.org>2008-02-23 10:26:52 +0100
commitbd95d6d5dbd27e2b904f7907ef39766159d0afcf (patch)
tree138138fad7b4e090bdd5e61ee0604ecfdc6e78b0 /source4/pidl/lib/Parse/Pidl
parente9b0056586f6e57d4d1243c5622c568497e04d38 (diff)
downloadsamba-bd95d6d5dbd27e2b904f7907ef39766159d0afcf.tar.gz
samba-bd95d6d5dbd27e2b904f7907ef39766159d0afcf.tar.bz2
samba-bd95d6d5dbd27e2b904f7907ef39766159d0afcf.zip
Respect the return value of asprintf
This removes tons of warnings warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result for me. Lots of that kind left though :-) (This used to be commit ba29219ea243cc217ab3522b036a82ff8dfeedc8)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index ef3eb3dbcf..a959dc84f6 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -775,8 +775,7 @@ sub ParseElementPrint($$$$)
$self->pidl("for ($counter=0;$counter<$length;$counter++) {");
$self->indent;
$self->pidl("char *idx_$l->{LEVEL_INDEX}=NULL;");
- $self->pidl("asprintf(&idx_$l->{LEVEL_INDEX}, \"[\%d]\", $counter);");
- $self->pidl("if (idx_$l->{LEVEL_INDEX}) {");
+ $self->pidl("if (asprintf(&idx_$l->{LEVEL_INDEX}, \"[\%d]\", $counter) != -1) {");
$self->indent;
$var_name = get_array_element($var_name, $counter);