diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-12 16:33:32 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-12 16:33:32 -0500 |
commit | 4e8732a2ad94982dcde175a6518da33021d2b6e8 (patch) | |
tree | 15007ccd3d06e41060b26f36fca3da24023f550e /src/cli/stasis_indexer/include/helpers.h | |
parent | afecc407fd0d36061169ae64164703382656cafe (diff) | |
download | stasis-4e8732a2ad94982dcde175a6518da33021d2b6e8.tar.gz |
Encapsulate macro arguments in parentheses
Diffstat (limited to 'src/cli/stasis_indexer/include/helpers.h')
-rw-r--r-- | src/cli/stasis_indexer/include/helpers.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cli/stasis_indexer/include/helpers.h b/src/cli/stasis_indexer/include/helpers.h index d493f75..46705d2 100644 --- a/src/cli/stasis_indexer/include/helpers.h +++ b/src/cli/stasis_indexer/include/helpers.h @@ -5,12 +5,12 @@ #define ARRAY_COUNT_DYNAMIC(X, COUNTER) \ do { \ - for (COUNTER = 0; X && X[COUNTER] != NULL; COUNTER++) {} \ + for ((COUNTER) = 0; (X) && (X)[COUNTER] != NULL; (COUNTER)++) {} \ } while(0) #define ARRAY_COUNT_BY_STRUCT_MEMBER(X, MEMBER, COUNTER) \ do { \ - for (COUNTER = 0; X[COUNTER].MEMBER != NULL; COUNTER++) {} \ + for ((COUNTER) = 0; (X)[COUNTER].MEMBER != NULL; (COUNTER)++) {} \ } while(0) struct StrList *get_architectures(struct Delivery ctx[], size_t nelem); |