]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: 51d.c: cleanup, fix preprocessor ifdefs
authorIlia Shipitsin <chipitsine@gmail.com>
Tue, 12 May 2026 10:14:03 +0000 (12:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 13 May 2026 15:00:20 +0000 (17:00 +0200)
The ifdef spans over function boundaries, making some combinations produce
code that does not build:

addons/51degrees/51d.c:638:1: error: Unmatched '}'. Configuration: ''. [syntaxError]

addons/51degrees/51d.c

index a23b468d6ab18662d1933a7862f69a5dded166d1..a00da8d4826df7a4cb17b91dbfbcd207fdddebc4 100644 (file)
@@ -550,6 +550,8 @@ static void _51d_process_match(const struct arg *args, struct sample *smp)
        char valuesBuffer[1024];
 #endif
 
+#if defined(FIFTYONEDEGREES_H_PATTERN_INCLUDED) || defined(FIFTYONEDEGREES_H_TRIE_INCLUDED) || defined(FIFTYONE_DEGREES_HASH_INCLUDED)
+
        char no_data[] = "NoData";  /* response when no data could be found */
        struct buffer *temp = get_trash_chunk();
        int i = 0, found;
@@ -636,6 +638,7 @@ static void _51d_process_match(const struct arg *args, struct sample *smp)
        smp->data.u.str.area = temp->area;
        smp->data.u.str.data = temp->data;
 }
+#endif
 
 /* Sets the sample data as a constant string. This ensures that the
  * string will be processed correctly.