Re: [PATCH 7/8] config: Don't return negative exit codes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, 15 Feb 2009, Felipe Contreras wrote:


>  	else if (actions & ACTION_RENAME_SECTION) {
> -		int ret;
>  		check_argc(argc, 2, 2);
>  		ret = git_config_rename_section(argv[0], argv[1]);
> -		if (ret < 0)
> -			return ret;
>  		if (ret == 0)
>  			die("No such section!");
>  	}

You need an "if (ret > 0) ret = 0;" to avoid regressions.

>  	else if (actions & ACTION_REMOVE_SECTION) {
> -		int ret;
>  		check_argc(argc, 1, 1);
>  		ret = git_config_rename_section(argv[0], NULL);
> -		if (ret < 0)
> -			return ret;
>  		if (ret == 0)
>  			die("No such section!");
>  	}

Likewise.

Thanks,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux