Skip to content

Commit

Permalink
janitor: use NULL and not 0 for pointers.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
MadCoder authored and gitster committed Jul 23, 2009
1 parent 5207079 commit 67da52b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 67da52b

Please sign in to comment.