From 4fc7f1d04333af9ff646ce5e1b1061265aa0d816 Mon Sep 17 00:00:00 2001 From: Vftdan Date: Sat, 24 Feb 2024 23:56:56 +0100 Subject: [PATCH] Take `base` argument into parenthesis too in the macro --- src/sfxd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sfxd.c b/src/sfxd.c index 13751c4..5c45283 100644 --- a/src/sfxd.c +++ b/src/sfxd.c @@ -17,7 +17,7 @@ #define MAX_SOURCE_DEPTH 32 // Set initial offset to size to distinguish start and end -#define FOR_OFFSET_PROBE(base, offset, index, size) for (int offset = (size) | 1, index = (base + offset) % (size); offset > 0; offset = (offset << 1L) % ((size) | 1), offset = offset == (size) ? (size) - 1 /* n * 2 = n - 1 (mod n + 1) */ : offset, index = (base + offset) % (size)) +#define FOR_OFFSET_PROBE(base, offset, index, size) for (int offset = (size) | 1, index = ((base) + offset) % (size); offset > 0; offset = (offset << 1L) % ((size) | 1), offset = offset == (size) ? (size) - 1 /* n * 2 = n - 1 (mod n + 1) */ : offset, index = ((base) + offset) % (size)) struct msg_target { FILE *file_handle;