]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: test-lldp-rx: set more variable as static const 37725/head
authorLorenzo Arena <arena.lor@gmail.com>
Thu, 5 Jun 2025 06:57:54 +0000 (08:57 +0200)
committerLorenzo Arena <arena.lor@gmail.com>
Fri, 6 Jun 2025 07:35:11 +0000 (09:35 +0200)
src/libsystemd-network/test-lldp-rx.c

index aa4bfd9b03e781e35067d167d8ba3068b54a3bf6..f9870679d4b6589a280d0ec9096d8163525fd410 100644 (file)
@@ -141,7 +141,7 @@ static void test_receive_basic_packet(sd_event *e) {
 static void test_receive_incomplete_packet(sd_event *e) {
         sd_lldp_rx *lldp_rx;
         sd_lldp_neighbor **neighbors;
-        uint8_t frame[] = {
+        static const uint8_t frame[] = {
                 /* Ethernet header */
                 0x01, 0x80, 0xc2, 0x00, 0x00, 0x03,     /* Destination MAC */
                 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,     /* Source MAC */
@@ -168,7 +168,7 @@ static void test_receive_incomplete_packet(sd_event *e) {
 static void test_receive_oui_packet(sd_event *e) {
         sd_lldp_rx *lldp_rx;
         sd_lldp_neighbor **neighbors;
-        uint8_t frame[] = {
+        static const uint8_t frame[] = {
                 /* Ethernet header */
                 0x01, 0x80, 0xc2, 0x00, 0x00, 0x03,     /* Destination MAC */
                 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,     /* Source MAC */