Skip to content

Commit

Permalink
refs.c: spell NULL pointer as NULL
Browse files Browse the repository at this point in the history
A call to update_ref_lock() passes '0' to the 'int *type_p' parameter.
Noticed by sparse.  ("Using plain integer as NULL pointer")

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
  • Loading branch information
Ramsay Jones authored and Jonathan Nieder committed Oct 14, 2013
1 parent 0b4dc66 commit ce1e846
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3235,7 +3235,7 @@ int update_ref(const char *action, const char *refname,
int flags, enum action_on_err onerr)
{
struct ref_lock *lock;
lock = update_ref_lock(refname, oldval, flags, 0, onerr);
lock = update_ref_lock(refname, oldval, flags, NULL, onerr);
if (!lock)
return 1;
return update_ref_write(action, refname, sha1, lock, onerr);
Expand Down

0 comments on commit ce1e846

Please sign in to comment.