Re: [PATCH v4 10/12] refs: implement removal of ref storages

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

 



Jeff King <peff@xxxxxxxx> writes:

> If removing either of the directories fails, we set ret to "-1". Make
> sense. But...
>
>> +	ret = for_each_root_ref(refs, remove_one_root_ref, &data);
>> +	if (ret < 0)
>> +		ret = -1;
>
> ...then we unconditionally overwrite it, forgetting the earlier error.

Ouch.

> Is that a mistake, or are we normalizing other negative values? Maybe
> just:
>
>   if (for_each_root_ref(refs, remove_one_root_ref, &data) < 0)
> 	ret = -1;
>
> would work?

Sounds sensible.

Thanks for carefully reading.




[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