Skip to content

Commit

Permalink
tree-wide: apply equals-null.cocci
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
gitster committed May 2, 2022
1 parent 7710d1b commit e6bf70d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ void create_branches_recursively(struct repository *r, const char *name,
* be created in every submodule.
*/
for (i = 0; i < submodule_entry_list.entry_nr; i++) {
if (submodule_entry_list.entries[i].repo == NULL) {
if (!submodule_entry_list.entries[i].repo) {
int code = die_message(
_("submodule '%s': unable to find submodule"),
submodule_entry_list.entries[i].submodule->name);
Expand Down
2 changes: 1 addition & 1 deletion compat/fsmonitor/fsm-listen-darwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ int fsm_listen__ctor(struct fsmonitor_daemon_state *state)
data->cfar_paths_to_watch,
kFSEventStreamEventIdSinceNow,
0.001, flags);
if (data->stream == NULL)
if (!data->stream)
goto failed;

/*
Expand Down

0 comments on commit e6bf70d

Please sign in to comment.