diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-05-02 09:50:37 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-05-02 09:50:37 -0700 |
| commit | afe8a9070bc62db9cfde1e30147178c40d391d93 (patch) | |
| tree | d237acac7915db89829db7da1d0405f2e595a68b /builtin/clone.c | |
| parent | contrib/coccinnelle: add equals-null.cocci (diff) | |
| download | git-afe8a9070bc62db9cfde1e30147178c40d391d93.tar.gz git-afe8a9070bc62db9cfde1e30147178c40d391d93.zip | |
tree-wide: apply equals-null.cocci
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clone.c')
| -rw-r--r-- | builtin/clone.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index fb377b2765..fa9e1fd3c7 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1070,10 +1070,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix) * apply the remote name provided by --origin only after this second * call to git_config, to ensure it overrides all config-based values. */ - if (option_origin != NULL) + if (option_origin) remote_name = xstrdup(option_origin); - if (remote_name == NULL) + if (!remote_name) remote_name = xstrdup("origin"); if (!valid_remote_name(remote_name)) |
