]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pidl: Wireshark: Const-ify dcerpc_sub_dissector structures.
authorJohn Thacker <johnthacker@gmail.com>
Wed, 3 Jul 2024 11:52:42 +0000 (07:52 -0400)
committerStefan Metzmacher <metze@samba.org>
Fri, 12 Jul 2024 09:59:32 +0000 (09:59 +0000)
Pick up change from Wireshark:

    commit 8a2a42241fd148ce735e776a6a1e6b49b64d215e
    Author: Darius Davis <darius-wireshark@free-range.com.au>
    Date:   Sun May 19 17:39:38 2024 +1000

        Const-ify dcerpc_sub_dissector structures.

        This moves about 56 kBytes of data from a read-write data section to read-only.

        The various dissectors were _not_ regenerated for this commit.  Instead, this
        commit was produced using the following command:

           find * -type f -exec sed -i -e 's/\(["'\'']\|^\)static dcerpc_sub_dissector/\1static const dcerpc_sub_dissector/' \{\} \;

        This updates the generator script and its test, as well as making an identical
        change to all of the dissectors, regardless of whether or not those dissectors
        were produced by the generator script.

Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
pidl/lib/Parse/Pidl/Wireshark/NDR.pm
pidl/tests/wireshark-ndr.pl

index 48c090497fe89c9a3d14c101f1ada81330734b2a..fedc85422626b311bf72d7f40fd04fcbd58006f8 100644 (file)
@@ -1340,7 +1340,7 @@ sub DumpFunctionTable($)
 {
        my $if = shift;
 
-       my $res = "static dcerpc_sub_dissector $if->{NAME}\_dissectors[] = {\n";
+       my $res = "static const dcerpc_sub_dissector $if->{NAME}\_dissectors[] = {\n";
        foreach (@{$if->{FUNCTIONS}}) {
                my $fn_name = $_->{NAME};
                $fn_name =~ s/^$if->{NAME}_//;
index fd2fa55357f58beb7af9df428960ca1871fb0cdd..04fa820a9d87739b40e81faa7368db720db2c8e9 100755 (executable)
@@ -241,7 +241,7 @@ static gint hf_bla;
 is(DumpFunctionTable({
                        NAME => "someif",
                        FUNCTIONS => [ { NAME => "fn1", OPNUM => 3 }, { NAME => "someif_fn2", OPNUM => 2 } ] }),
-'static dcerpc_sub_dissector someif_dissectors[] = {
+'static const dcerpc_sub_dissector someif_dissectors[] = {
        { 3, "fn1",
           someif_dissect_fn1_request, someif_dissect_fn1_response},
        { 2, "fn2",