mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-21 11:30:01 +00:00
Add test++ linx++
This commit is contained in:
1 parent
cb220837b9
commit
d7a02d13e4
7 files changed
+18
-12
No files matched your search
+2
-1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user