Skip to content

Commit

Permalink
Fix compiler warning (freeswitch#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
seven1240 authored Aug 25, 2021
1 parent 84933f1 commit 57546af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libsofia-sip-ua/http/http_header.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ int http_request_complete(msg_t *msg)
if (!http->http_host)
return -1;

for (pl = http->http_payload; pl; pl = pl->pl_next)
len += pl->pl_len;
for (pl = http->http_payload; pl; pl = pl->pl_next)
len += pl->pl_len;

if (len > UINT32_MAX)
return -1;
Expand Down
3 changes: 2 additions & 1 deletion libsofia-sip-ua/http/http_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ http_method_t http_method_d(char **ss, char const **nname)
case 'O': if (MATCH(s, "OPTIONS")) code = http_method_options; break;
case 'P': if (MATCH(s, "POST")) code = http_method_post;
else
if (MATCH(s, "PUT")) code = http_method_put; break;
if (MATCH(s, "PUT")) code = http_method_put;
break;
case 'T': if (MATCH(s, "TRACE")) code = http_method_trace; break;
}

Expand Down
3 changes: 2 additions & 1 deletion libsofia-sip-ua/msg/msg_date.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ issize_t msg_date_d(char const **ss, msg_time_t *date)
/* actime-date =
wkday SP month SP ( 2DIGIT | ( SP 1DIGIT )) SP time SP 4DIGIT */
mon = month_d(s); skip_token(&s);
if (mon < 0 || !IS_LWS(*s)) return -1; s++;
if (mon < 0 || !IS_LWS(*s)) return -1;
s++;
while (IS_LWS(*s)) s++;
if (!is_digit(*s)) return -1;
day = *s++ - '0'; if (is_digit(*s)) day = 10 * day + *s++ - '0';
Expand Down

0 comments on commit 57546af

Please sign in to comment.