diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 5ffb67846b3..ed86571aa20 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -1157,8 +1157,10 @@ sub ParseElementPullLevel $self->indent; if ($l->{POINTER_TYPE} eq "relative" or $l->{POINTER_TYPE} eq "relative_short") { - $self->pidl("uint32_t _relative_save_offset;"); - $self->pidl("_relative_save_offset = $ndr->offset;"); + if ($l->{POINTER_TYPE} eq "relative") { + $self->pidl("uint32_t _relative_save_offset;"); + $self->pidl("_relative_save_offset = $ndr->offset;"); + } $self->pidl("NDR_CHECK(ndr_pull_relative_ptr2($ndr, $var_name));"); } }