]> PatchyGit - patchyircd.git/commitdiff
crypt_blowfish.c: clang++ compat in BF_swap
authorEgor <egor@patchysicp.xyz>
Tue, 21 Jan 2025 07:36:44 +0000 (09:36 +0200)
committerEgor <egor@patchysicp.xyz>
Tue, 21 Jan 2025 07:36:44 +0000 (09:36 +0200)
src/crypt_blowfish.c

index db7d2be..e4b4602 100644 (file)
@@ -431,7 +431,8 @@ static void BF_encode(char *dst, const BF_word *src, int size)
 
 static void BF_swap(BF_word *x, int count)
 {
-       if ((union { int i; char c; }){1}.c)
+       union { int i; char c; } u = {1};
+       if (u.c)
        do {
                BF_word tmp = *x;
                tmp = (tmp << 16) | (tmp >> 16);