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;
+1 -1
View File
@@ -6,7 +6,7 @@ struct mg_str mg_str(const char *s) {
return str;
}
struct mg_str mg_str_n(const char *s, int n) {
struct mg_str mg_str_n(const char *s, size_t n) {
struct mg_str str = {s, n};
return str;
}
+1 -1
View File
@@ -12,7 +12,7 @@ struct mg_str {
{ NULL, 0 }
struct mg_str mg_str(const char *s);
struct mg_str mg_str_n(const char *s, int n);
struct mg_str mg_str_n(const char *s, size_t n);
int mg_lower(const char *s);
int mg_ncasecmp(const char *s1, const char *s2, size_t len);
int mg_casecmp(const char *s1, const char *s2);