]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fundamental: Drop some unnecessary ifdefs
authorJan Janssen <medhefgo@web.de>
Sat, 7 Jan 2023 08:14:41 +0000 (09:14 +0100)
committerJan Janssen <medhefgo@web.de>
Tue, 21 Feb 2023 20:07:04 +0000 (21:07 +0100)
With gnu-efi headers gone, we don't need these guards anymore.

src/fundamental/macro-fundamental.h
src/fundamental/string-util-fundamental.c
src/fundamental/string-util-fundamental.h

index c4ad957588881489e88a72bf11309e37731371db..fa5b5d221a4d5575b966a09920d88a2ddd7cbfdf 100644 (file)
@@ -339,11 +339,8 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
 #define ALIGN2_PTR(p) ((void*) ALIGN2((uintptr_t) p))
 #define ALIGN4_PTR(p) ((void*) ALIGN4((uintptr_t) p))
 #define ALIGN8_PTR(p) ((void*) ALIGN8((uintptr_t) p))
-#if !SD_BOOT
-/* libefi also provides ALIGN, and we do not use them in sd-boot explicitly. */
 #define ALIGN(l)  ALIGN_TO(l, sizeof(void*))
 #define ALIGN_PTR(p) ((void*) ALIGN((uintptr_t) (p)))
-#endif
 
 /* Checks if the specified pointer is aligned as appropriate for the specific type */
 #define IS_ALIGNED16(p) (((uintptr_t) p) % __alignof__(uint16_t) == 0)
index 484131d72a809b007d9a36c18d916b66afc73d01..a5bafc63f4769e3202532e352f9bd3e3e8746b48 100644 (file)
@@ -20,7 +20,6 @@ sd_char *startswith(const sd_char *s, const sd_char *prefix) {
         return (sd_char*) s + l;
 }
 
-#if !SD_BOOT
 sd_char *startswith_no_case(const sd_char *s, const sd_char *prefix) {
         size_t l;
 
@@ -33,7 +32,6 @@ sd_char *startswith_no_case(const sd_char *s, const sd_char *prefix) {
 
         return (sd_char*) s + l;
 }
-#endif
 
 sd_char* endswith(const sd_char *s, const sd_char *postfix) {
         size_t sl, pl;
index f55dcbf56a5b6fa779db7a41eb6d44317f3c0511..9019542b169c3058e200afb78fb87329cdd527b7 100644 (file)
@@ -58,9 +58,7 @@ static inline size_t strlen_ptr(const sd_char *s) {
 }
 
 sd_char *startswith(const sd_char *s, const sd_char *prefix) _pure_;
-#if !SD_BOOT
 sd_char *startswith_no_case(const sd_char *s, const sd_char *prefix) _pure_;
-#endif
 sd_char *endswith(const sd_char *s, const sd_char *postfix) _pure_;
 sd_char *endswith_no_case(const sd_char *s, const sd_char *postfix) _pure_;