From: Pierre Habouzit Date: Wed, 22 Jul 2009 21:34:33 +0000 (+0200) Subject: janitor: use NULL and not 0 for pointers. X-Git-Tag: v1.6.4-rc2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=67da52bedc5750c10a732b9da7d64d5ef73f3b8a;p=git.git janitor: use NULL and not 0 for pointers. Brought to you thanks to coccinelle: ---8<---- @@ expression *E; @@ ( E == - 0 + NULL | E != - 0 + NULL | E = - 0 + NULL ) @@ identifier f; type T; @@ T *f(...) { <... - return 0; + return NULL; ...> } --->8---- There are a lot more hits in compat/nedmallox and compat/regex but these are borrowed code we rather do not want to maintain our own forks for, and this patch refrains from touching them. Signed-off-by: Pierre Habouzit Signed-off-by: Junio C Hamano --- diff --git a/graph.c b/graph.c index f8d7a5c0f..e46677020 100644 --- a/graph.c +++ b/graph.c @@ -893,7 +893,7 @@ static struct column *find_new_column_by_commit(struct git_graph *graph, if (graph->new_columns[i].commit == commit) return &graph->new_columns[i]; } - return 0; + return NULL; } static void graph_output_post_merge_line(struct git_graph *graph, struct strbuf *sb)