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

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

 



On Sun, Feb 15, 2009 at 2:22 PM, Johannes Schindelin
<Johannes.Schindelin@xxxxxx> wrote:
> 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.

True. Fixed in the attached patch.

-- 
Felipe Contreras

Attachment: 0007-config-Don-t-return-negative-exit-codes.patch
Description: Binary data


[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