diff --git a/include/haproxy/mqtt-t.h b/include/haproxy/mqtt-t.h index 3af2d1158..030a29b74 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 5688296e5..7abbbbf0c 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; }