diff options
Diffstat (limited to 'mailinfo.c')
| -rw-r--r-- | mailinfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mailinfo.c b/mailinfo.c index 02f6f95357..833d28612f 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -317,7 +317,7 @@ static void cleanup_subject(struct mailinfo *mi, struct strbuf *subject) pos = strchr(subject->buf + at, ']'); if (!pos) break; - remove = pos - subject->buf + at + 1; + remove = pos - (subject->buf + at) + 1; if (!mi->keep_non_patch_brackets_in_subject || (7 <= remove && memmem(subject->buf + at, remove, "PATCH", 5))) @@ -698,7 +698,7 @@ static int is_scissors_line(const char *line) continue; } last_nonblank = c; - if (first_nonblank == NULL) + if (!first_nonblank) first_nonblank = c; if (*c == '-') { in_perforation = 1; @@ -1094,7 +1094,7 @@ static void handle_body(struct mailinfo *mi, struct strbuf *line) */ lines = strbuf_split(line, '\n'); for (it = lines; (sb = *it); it++) { - if (*(it + 1) == NULL) /* The last line */ + if (!*(it + 1)) /* The last line */ if (sb->buf[sb->len - 1] != '\n') { /* Partial line, save it for later. */ strbuf_addbuf(&prev, sb); |
