1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-12-22 04:02:04 +03:00

Auto-format after merge

This commit is contained in:
bel
2016-08-15 21:43:38 +02:00
parent a71d31cf2f
commit a3d83a152e
2 changed files with 69 additions and 71 deletions

View File

@@ -4866,7 +4866,7 @@ mg_get_cookie(const char *cookie_header,
name_len = (int)strlen(var_name); name_len = (int)strlen(var_name);
end = s + strlen(s); end = s + strlen(s);
for (; (s = mg_strcasestr( s, var_name)) != NULL; s += name_len) { for (; (s = mg_strcasestr(s, var_name)) != NULL; s += name_len) {
if (s[name_len] == '=') { if (s[name_len] == '=') {
/* HCP24: now check is it a substring or a full cookie name */ /* HCP24: now check is it a substring or a full cookie name */
if ((s == cookie_header) || (s[-1] == ' ')) { if ((s == cookie_header) || (s[-1] == ' ')) {
@@ -4884,8 +4884,7 @@ mg_get_cookie(const char *cookie_header,
if ((size_t)(p - s) < dst_size) { if ((size_t)(p - s) < dst_size) {
len = (int)(p - s); len = (int)(p - s);
mg_strlcpy(dst, s, (size_t)len + 1); mg_strlcpy(dst, s, (size_t)len + 1);
} } else {
else {
len = -3; len = -3;
} }
break; break;

View File

@@ -53,8 +53,7 @@ timer_add(struct mg_context *ctx,
*/ */
if (is_relative) { if (is_relative) {
next_time += dt; next_time += dt;
} } else if (next_time < dt) {
else if (next_time < dt) {
next_time = dt; next_time = dt;
} }