Re: [PATCH 1/2] config: define and document exit codes

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

 



Thiago Farina venit, vidit, dixit 17.05.2011 17:46:
> On Tue, May 17, 2011 at 12:38 PM, Michael J Gruber
> <git@xxxxxxxxxxxxxxxxxxxx> wrote:
>> The return codes of git_config_set() and friends are magic numbers right
>> in the source. #define them in cache.h where the functions are declared,
> 
> Why defining them on cache.h? Just because the functions are declared
> there? Is this a good reason? I think this pollute even more the
> cache.h and these constants are not used outside of config.c. So I'd
> move them back onto config.c. Maybe it's fine as is though.

Because, potentially, they are used by callers of these external
functions. It's the interface declaration. And in fact, 2/2 creates such
a use.

Michael
--
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]