Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-05-02 19:50:37 +0300
committerJunio C Hamano <gitster@pobox.com>2022-05-02 19:50:37 +0300
commitafe8a9070bc62db9cfde1e30147178c40d391d93 (patch)
treed237acac7915db89829db7da1d0405f2e595a68b /mailinfo.c
parent7a618493facb79639231f797e492fab51fac2ba4 (diff)
tree-wide: apply equals-null.cocci
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mailinfo.c')
-rw-r--r--mailinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mailinfo.c b/mailinfo.c
index 02f6f95357..9621ba62a3 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -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);