pidl:NDR/Parser: remove unused code for array element index
authorStefan Metzmacher <metze@samba.org>
Tue, 21 Sep 2010 08:34:30 +0000 (10:34 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 28 Sep 2010 21:06:51 +0000 (23:06 +0200)
metze

pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm

index b5393613f688d57012724c2b87461af4211444ca..c76ef6bfcd502fbc2917de4bdf66e5c4c549caff 100644 (file)
@@ -791,9 +791,6 @@ sub ParseElementPrint($$$$$)
                                $self->pidl("$ndr->depth++;");
                                $self->pidl("for ($counter=0;$counter<$length;$counter++) {");
                                $self->indent;
-                               $self->pidl("char *idx_$l->{LEVEL_INDEX}=NULL;");
-                               $self->pidl("if (asprintf(&idx_$l->{LEVEL_INDEX}, \"[\%d]\", $counter) != -1) {");
-                               $self->indent;
 
                                $var_name = get_array_element($var_name, $counter);
                        }
@@ -816,9 +813,6 @@ sub ParseElementPrint($$$$$)
                } elsif (($l->{TYPE} eq "ARRAY")
                        and not is_charset_array($e,$l)
                        and not has_fast_array($e,$l)) {
-                       $self->pidl("free(idx_$l->{LEVEL_INDEX});");
-                       $self->deindent;
-                       $self->pidl("}");
                        $self->deindent;
                        $self->pidl("}");
                        $self->pidl("$ndr->depth--;");