Skip to content

Commit

Permalink
parse_qop_value(): Simplify trimming code
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Sep 25, 2020
1 parent b532509 commit ad55f65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parser/parse_authenticate.c
Expand Up @@ -119,16 +119,16 @@ int parse_qop_value(str val, struct authenticate_body *auth)

if (val.len == 0)
return 0;
while (val.len > 0 && is_ws(*val.s))
STR_ADVANCE(&val);

trim_leading(&val);

if (val.len == 0)
return 0;
if (*val.s != ',')
return -1;
postcomma:
STR_ADVANCE(&val);
while (val.len > 0 && is_ws(*val.s))
STR_ADVANCE(&val);
trim_leading(&val);

/* parse second token */
if (val.len < 4 || LOWER4B(GET4B(val.s))!=0x61757468) /* "auth" */
Expand Down

0 comments on commit ad55f65

Please sign in to comment.