decimal_width: avoid integer overflow
[gitweb.git] / pretty.c
index b4e32b74d3622f92b2c5d3b9881e5cdf49d7f375..296cb5680ac6ba7a7c7670652e9287f56a1c1338 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -274,7 +274,7 @@ static void add_rfc822_quoted(struct strbuf *out, const char *s, int len)
 
 enum rfc2047_type {
        RFC2047_SUBJECT,
-       RFC2047_ADDRESS,
+       RFC2047_ADDRESS
 };
 
 static int is_rfc2047_special(char ch, enum rfc2047_type type)
@@ -497,7 +497,7 @@ void pp_user_info(struct pretty_print_context *pp,
 static int is_empty_line(const char *line, int *len_p)
 {
        int len = *len_p;
-       while (len && isspace(line[len-1]))
+       while (len && isspace(line[len - 1]))
                len--;
        *len_p = len;
        return !len;