From: Nicolas CARPi Date: Tue, 27 Aug 2024 19:51:26 +0000 (+0200) Subject: CLEANUP: mqtt: fix typo in MQTT_REMAINING_LENGHT_MAX_SIZE X-Git-Tag: v3.1-dev7~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a33407b499c40e322e74f8c4b0dde1b0773a4a3a;p=thirdparty%2Fhaproxy.git CLEANUP: mqtt: fix typo in MQTT_REMAINING_LENGHT_MAX_SIZE There was a typo in the macro name, where LENGTH was incorrectly written. This didn't cause any issue because the typo appeared in all occurrences in the codebase. --- diff --git a/include/haproxy/mqtt-t.h b/include/haproxy/mqtt-t.h index 3af2d1158b..030a29b744 100644 --- a/include/haproxy/mqtt-t.h +++ b/include/haproxy/mqtt-t.h @@ -118,7 +118,7 @@ enum { /* MQTT minimal packet size */ #define MQTT_MIN_PKT_SIZE 2 -#define MQTT_REMAINING_LENGHT_MAX_SIZE 4 +#define MQTT_REMAINING_LENGTH_MAX_SIZE 4 /* list of supported capturable Field Names and configuration file string */ enum { diff --git a/src/mqtt.c b/src/mqtt.c index 5688296e52..7abbbbf0cf 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -238,7 +238,7 @@ static inline struct ist mqtt_read_4byte_int(struct ist parser, uint32_t *i) * Thus each byte encodes 128 values and a "continuation bit". * * The maximum number of bytes in the Remaining Length field is four - * (MQTT_REMAINING_LENGHT_MAX_SIZE). + * (MQTT_REMAINING_LENGTH_MAX_SIZE). * * is supposed to point to the first byte of the integer. On success * the integer is stored in <*i> and the new parser state is returned. On @@ -251,7 +251,7 @@ static inline struct ist mqtt_read_varint(struct ist parser, uint32_t *i) off = m = 0; if (i) *i = 0; - for (off = 0; off < MQTT_REMAINING_LENGHT_MAX_SIZE && istlen(parser); off++) { + for (off = 0; off < MQTT_REMAINING_LENGTH_MAX_SIZE && istlen(parser); off++) { uint8_t byte = (uint8_t)*istptr(parser); if (i) { @@ -265,7 +265,7 @@ static inline struct ist mqtt_read_varint(struct ist parser, uint32_t *i) break; } - if (off == MQTT_REMAINING_LENGHT_MAX_SIZE) + if (off == MQTT_REMAINING_LENGTH_MAX_SIZE) return IST_NULL; return parser; }