From 23661f102f363ae9e783afb06cf5d0b8474fdc16 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 26 Aug 2016 21:51:37 -0400 Subject: whitespace --- fhp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'fhp.c') diff --git a/fhp.c b/fhp.c index 428fc38..7b95722 100644 --- a/fhp.c +++ b/fhp.c @@ -123,7 +123,7 @@ fhp_strerror( size_t err_len = strlen(fhp_errors[err]) + 1; if (len < err_len) return FHP_ERR_BUFFER_TOO_SMALL; - + // copy string memcpy(buf, fhp_errors[err], err_len); @@ -471,7 +471,7 @@ retry: // FIXME: invalid character return FHP_ERR_INVALID_CHAR; } - + break; case FHP_STATE_HEADER_NAME_END: switch (byte) { @@ -517,21 +517,23 @@ retry: case '\n': fhp->state = FHP_STATE_HEADER_VALUE_END; break; - default: + default: return FHP_ERR_INVALID_CHAR; } - + break; case FHP_STATE_HEADER_VALUE_END: switch (byte) { CASE_OWS_CHARS // ows-fold - + // add to buffer if (!fhp_buf_push(fhp, FHP_TOKEN_HEADER_VALUE_FRAGMENT, ' ')) return FHP_ERR_CB; + // set state fhp->state = FHP_STATE_HEADER_VALUE; + break; CASE_TOKEN_CHARS // flush buffer @@ -598,6 +600,7 @@ retry: break; case FHP_STATE_HEADERS_END: // TODO + break; default: // FIXME: invalid state -- cgit v1.2.3