Makes decode_q_segment and decode_b_segment void and cleans up function calls. David Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx> --- builtin-mailinfo.c | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c index 24a4fc6..bac3048 100644 --- a/builtin-mailinfo.c +++ b/builtin-mailinfo.c @@ -462,7 +462,7 @@ static unsigned hexval(int c) return ~0; } -static int decode_q_segment(char *in, char *ot, char *ep, int rfc2047) +static void decode_q_segment(char *in, char *ot, char *ep, int rfc2047) { int c; while ((c = *in++) != 0 && (in <= ep)) { @@ -478,10 +478,9 @@ static int decode_q_segment(char *in, ch *ot++ = c; } *ot = 0; - return 0; } -static int decode_b_segment(char *in, char *ot, char *ep) +static void decode_b_segment(char *in, char *ot, char *ep) { /* Decode in..ep, possibly in-place to ot */ int c, pos = 0, acc = 0; @@ -525,7 +524,6 @@ static int decode_b_segment(char *in, ch } } *ot = 0; - return 0; } static void convert_to_utf8(char *line, char *charset) @@ -606,10 +604,12 @@ static int decode_header_bq(char *it) default: return rfc2047; /* no munging */ case 'b': - sz = decode_b_segment(cp + 3, piecebuf, ep); + decode_b_segment(cp + 3, piecebuf, ep); + sz = 0; break; case 'q': - sz = decode_q_segment(cp + 3, piecebuf, ep, 1); + decode_q_segment(cp + 3, piecebuf, ep, 1); + sz = 0; break; } if (sz < 0) @@ -746,9 +746,7 @@ static int handle_multipart_one_part(int handle_patch(); break; } - if (n == 0) - return -1; - return 0; + return n ? 0 : -1; } static void handle_multipart_body(void) -- 1.4.2.g89bb-dirty - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html