Fix define macros, was missing the do {} while (0) wrapping

This commit is contained in:
René van Dorst
2026-08-30 19:35:37 +02:00
parent fc3c686564
commit 4e04735a5f
2 changed files with 7 additions and 4 deletions
+3 -2
View File
@@ -8,11 +8,12 @@
#define STAT_COUNTER_RX_PKTS 47
#define STAT_COUNTER_ERR_PKTS 48
#define STAT_GET(cnt, port) \
#define STAT_GET(cnt, port) do { \
REG_WRITE(RTL837X_STAT_GET, 0x00, 0x00, cnt >> 3, (cnt << 5) | (port << 1) | 1); \
do { \
reg_read_m(RTL837X_STAT_GET); \
} while (sfr_data[3] & 0x1);
} while (sfr_data[3] & 0x1); \
} while (0)
// Possible values for ingress filter type
typedef enum {