cleanup style in parser
Signed-off-by: Andy Green <andy.green@linaro.org>
diff --git a/lib/parsers.c b/lib/parsers.c
index ac9eda1..3d67099 100644
--- a/lib/parsers.c
+++ b/lib/parsers.c
@@ -317,8 +317,8 @@
if (c == '.') {
wsi->u.hdr.ups = URIPS_SEEN_SLASH_DOT;
goto swallow;
- } else
- wsi->u.hdr.ups = URIPS_IDLE;
+ }
+ wsi->u.hdr.ups = URIPS_IDLE;
break;
case URIPS_SEEN_SLASH_DOT:
/* swallow second . */
@@ -357,8 +357,8 @@
/* last issued was /, so another / == // */
if (c == '/')
goto swallow;
- else /* last we issued was / so SEEN_SLASH */
- wsi->u.hdr.ups = URIPS_SEEN_SLASH;
+ /* last we issued was / so SEEN_SLASH */
+ wsi->u.hdr.ups = URIPS_SEEN_SLASH;
break;
case URIPS_ARGUMENTS:
/* leave them alone */
@@ -397,15 +397,12 @@
lwsl_parser("*\n");
}
- {
- int issue_result = issue_char(wsi, c);
- if (issue_result < 0) {
- return -1;
- }
- else if(issue_result > 0) {
- wsi->u.hdr.parser_state = WSI_TOKEN_SKIPPING;
- };
- };
+ n = issue_char(wsi, c);
+ if (n < 0)
+ return -1;
+ if (n > 0)
+ wsi->u.hdr.parser_state = WSI_TOKEN_SKIPPING;
+
swallow:
/* per-protocol end of headers management */