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.
This commit is contained in:
Nicolas CARPi 2024-08-27 21:51:26 +02:00 committed by Willy Tarreau
parent 534e7e4598
commit a33407b499
2 changed files with 4 additions and 4 deletions

View File

@ -118,7 +118,7 @@ enum {
/* MQTT minimal packet size */ /* MQTT minimal packet size */
#define MQTT_MIN_PKT_SIZE 2 #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 */ /* list of supported capturable Field Names and configuration file string */
enum { enum {

View File

@ -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". * Thus each byte encodes 128 values and a "continuation bit".
* *
* The maximum number of bytes in the Remaining Length field is four * The maximum number of bytes in the Remaining Length field is four
* (MQTT_REMAINING_LENGHT_MAX_SIZE). * (MQTT_REMAINING_LENGTH_MAX_SIZE).
* *
* <parser> is supposed to point to the first byte of the integer. On success * <parser> 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 * 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; off = m = 0;
if (i) if (i)
*i = 0; *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); uint8_t byte = (uint8_t)*istptr(parser);
if (i) { if (i) {
@ -265,7 +265,7 @@ static inline struct ist mqtt_read_varint(struct ist parser, uint32_t *i)
break; break;
} }
if (off == MQTT_REMAINING_LENGHT_MAX_SIZE) if (off == MQTT_REMAINING_LENGTH_MAX_SIZE)
return IST_NULL; return IST_NULL;
return parser; return parser;
} }