From: Daan De Meyer Date: Wed, 30 Apr 2025 08:09:00 +0000 (+0200) Subject: sd-id128: Use static instead of _SD_ARRAY_STATIC in source files X-Git-Tag: v258-rc1~701^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a40f6dd4d8b03e90923e4548420ea65ca6847ae3;p=thirdparty%2Fsystemd.git sd-id128: Use static instead of _SD_ARRAY_STATIC in source files When compiling the source files, we know static is going to be available so there's no need to use the macro from _sd-common.h and we can just use static instead. --- diff --git a/src/libsystemd-network/lldp-neighbor.c b/src/libsystemd-network/lldp-neighbor.c index 457b1e5926b..67500895f8b 100644 --- a/src/libsystemd-network/lldp-neighbor.c +++ b/src/libsystemd-network/lldp-neighbor.c @@ -685,7 +685,7 @@ int sd_lldp_neighbor_tlv_is_type(sd_lldp_neighbor *n, uint8_t type) { return type == k; } -int sd_lldp_neighbor_tlv_get_oui(sd_lldp_neighbor *n, uint8_t oui[_SD_ARRAY_STATIC 3], uint8_t *subtype) { +int sd_lldp_neighbor_tlv_get_oui(sd_lldp_neighbor *n, uint8_t oui[static 3], uint8_t *subtype) { const uint8_t *d; size_t length; int r; @@ -714,7 +714,7 @@ int sd_lldp_neighbor_tlv_get_oui(sd_lldp_neighbor *n, uint8_t oui[_SD_ARRAY_STAT return 0; } -int sd_lldp_neighbor_tlv_is_oui(sd_lldp_neighbor *n, const uint8_t oui[_SD_ARRAY_STATIC 3], uint8_t subtype) { +int sd_lldp_neighbor_tlv_is_oui(sd_lldp_neighbor *n, const uint8_t oui[static 3], uint8_t subtype) { uint8_t k[3], st; int r; diff --git a/src/libsystemd/sd-id128/sd-id128.c b/src/libsystemd/sd-id128/sd-id128.c index 1f59f834ef6..54fb403a54b 100644 --- a/src/libsystemd/sd-id128/sd-id128.c +++ b/src/libsystemd/sd-id128/sd-id128.c @@ -23,7 +23,7 @@ #include "stat-util.h" #include "user-util.h" -_public_ char *sd_id128_to_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID128_STRING_MAX]) { +_public_ char *sd_id128_to_string(sd_id128_t id, char s[static SD_ID128_STRING_MAX]) { size_t k = 0; assert_return(s, NULL); @@ -39,7 +39,7 @@ _public_ char *sd_id128_to_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID12 return s; } -_public_ char *sd_id128_to_uuid_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID128_UUID_STRING_MAX]) { +_public_ char *sd_id128_to_uuid_string(sd_id128_t id, char s[static SD_ID128_UUID_STRING_MAX]) { size_t k = 0; assert_return(s, NULL);