Merge branch 'ep/maint-equals-null-cocci'
Introduce and apply coccinelle rule to discourage an explicit comparison between a pointer and NULL, and applies the clean-up to the maintenance track. * ep/maint-equals-null-cocci: tree-wide: apply equals-null.cocci tree-wide: apply equals-null.cocci contrib/coccinnelle: add equals-null.cocci
This commit is contained in:
@ -1106,12 +1106,12 @@ 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) {
|
||||
free(remote_name);
|
||||
remote_name = xstrdup(option_origin);
|
||||
}
|
||||
|
||||
if (remote_name == NULL)
|
||||
if (!remote_name)
|
||||
remote_name = xstrdup("origin");
|
||||
|
||||
if (!valid_remote_name(remote_name))
|
||||
|
Reference in New Issue
Block a user