diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-05-02 10:06:00 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-05-02 10:06:04 -0700 |
| commit | 2b0a58d164b0642be3eeb476fecd28114445cdd5 (patch) | |
| tree | 2759549fcdd5d3ce4c9776f67937b4b75c07070f /compat/mingw.c | |
| parent | d516b2db0af2221bd6b13e7347abdcb5830b2829 (diff) | |
| parent | afe8a9070bc62db9cfde1e30147178c40d391d93 (diff) | |
| download | git-2b0a58d164b0642be3eeb476fecd28114445cdd5.tar.xz | |
Merge branch 'ep/maint-equals-null-cocci' for maint-2.35
* ep/maint-equals-null-cocci:
tree-wide: apply equals-null.cocci
contrib/coccinnelle: add equals-null.cocci
Diffstat (limited to 'compat/mingw.c')
| -rw-r--r-- | compat/mingw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index 41fc16310c..3b8adf8ed5 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1045,7 +1045,7 @@ char *mingw_mktemp(char *template) int mkstemp(char *template) { char *filename = mktemp(template); - if (filename == NULL) + if (!filename) return -1; return open(filename, O_RDWR | O_CREAT, 0600); } @@ -2317,7 +2317,7 @@ int setitimer(int type, struct itimerval *in, struct itimerval *out) static const struct timeval zero; static int atexit_done; - if (out != NULL) + if (out) return errno = EINVAL, error("setitimer param 3 != NULL not implemented"); if (!is_timeval_eq(&in->it_interval, &zero) && @@ -2346,7 +2346,7 @@ int sigaction(int sig, struct sigaction *in, struct sigaction *out) if (sig != SIGALRM) return errno = EINVAL, error("sigaction only implemented for SIGALRM"); - if (out != NULL) + if (out) return errno = EINVAL, error("sigaction: param 3 != NULL not implemented"); |
