svn commit: samba r19541 - in
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR: .
jelmer at samba.org
jelmer at samba.org
Fri Nov 3 19:55:21 GMT 2006
Author: jelmer
Date: 2006-11-03 19:55:17 +0000 (Fri, 03 Nov 2006)
New Revision: 19541
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19541
Log:
Explicitly segfault when the API is being used incorrectly. Previously
this would've caused a silent premature return.
Modified:
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2006-11-03 11:23:07 UTC (rev 19540)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2006-11-03 19:55:17 UTC (rev 19541)
@@ -188,18 +188,6 @@
}
#####################################################################
-# check that a variable we get from ParseExpr isn't a null pointer
-# void return varient
-sub check_null_pointer_void($)
-{
- my $size = shift;
- if ($size =~ /^\*/) {
- my $size2 = substr($size, 1);
- pidl "if ($size2 == NULL) return;";
- }
-}
-
-#####################################################################
# declare a function public or static, depending on its attributes
sub fn_declare($$$)
{
@@ -757,7 +745,6 @@
pidl "ndr_print_$l->{DATA_TYPE}(ndr, \"$e->{NAME}\", $var_name);";
} elsif ($l->{TYPE} eq "SWITCH") {
my $switch_var = ParseExpr($l->{SWITCH_IS}, $env);
- check_null_pointer_void($switch_var);
pidl "ndr_print_set_switch_value(ndr, " . get_pointer_to($var_name) . ", $switch_var);";
}
}
More information about the samba-cvs
mailing list