tree-wide: apply equals-null.cocci
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
May 2, 2022 at 10:18 UTC
e6bf70d17624425aa0d7e9518b6a62dad13e4c5d
2 files changed
+2
-2
branch.c
+1
-1
@@ -653,7 +653,7 @@ void create_branches_recursively(struct repository *r, const char *name,
653
* be created in every submodule.
654
*/
655
for (i = 0; i < submodule_entry_list.entry_nr; i++) {
656
- if (submodule_entry_list.entries[i].repo == NULL) {
656
+ if (!submodule_entry_list.entries[i].repo) {
657
int code = die_message(
658
_("submodule '%s': unable to find submodule"),
659
submodule_entry_list.entries[i].submodule->name);
compat/fsmonitor/fsm-listen-darwin.c
+1
-1
@@ -342,7 +342,7 @@ int fsm_listen__ctor(struct fsmonitor_daemon_state *state)
342
data->cfar_paths_to_watch,
343
kFSEventStreamEventIdSinceNow,
344
0.001, flags);
345
- if (data->stream == NULL)
345
+ if (!data->stream)
346
goto failed;
347
348
/*