]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-protocol: Save 50 bytes .text segment
authorVolker Lendecke <vl@samba.org>
Wed, 29 Dec 2021 13:46:14 +0000 (14:46 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 13 Jan 2022 16:13:38 +0000 (16:13 +0000)
Having this as a small static .text is simpler than having to create
this on the stack.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/protocol/protocol_util.c

index 1f1d874167a141181e5e2535526589ff045434a8..0a0998f18477a8b165e4f55ddf1a59ca8f111da6 100644 (file)
@@ -237,7 +237,7 @@ static int ip_from_string(const char *str, ctdb_sock_addr *addr)
        if (p == NULL) {
                ret = ipv4_from_string(str, &addr->ip);
        } else {
-               uint8_t ipv4_mapped_prefix[12] = {
+               static const uint8_t ipv4_mapped_prefix[12] = {
                        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff
                };