Add test++ linx++

This commit is contained in:
cpq committed 2020-12-07 03:47:37 +00:00
1 parent cb220837b9
commit d7a02d13e4
7 files changed
+18 -12

No files matched your search

+2 -1
View File
@@ -43,7 +43,8 @@ struct mqtt_message {
static void mqtt_send_header(struct mg_connection *c, uint8_t cmd,
uint8_t flags, uint32_t len) {
uint8_t buf[1 + sizeof(len)] = {(cmd << 4) | flags}, *vlen = &buf[1];
uint8_t buf[1 + sizeof(len)], *vlen = &buf[1];
buf[0] = (cmd << 4) | flags;
do {
*vlen = len % 0x80;
len /= 0x80;