From 70b8d2c8eb42cbde5dbf5642afd2ccc9b3c76808 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 3 Nov 2006 19:55:17 +0000 Subject: r19541: Explicitly segfault when the API is being used incorrectly. Previously this would've caused a silent premature return. (This used to be commit 91ae5a803334f77c2328ea12542158aab4da2da8) --- source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'source4/pidl/lib/Parse') diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 6124935e67..75f30f7370 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -187,18 +187,6 @@ sub check_null_pointer_deferred($) } } -##################################################################### -# 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 @@ sub ParseElementPrint($$$) 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);"; } } -- cgit