Re: [PATCH] very small cleanup: #undef a macro that isn't used anywhere else

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

 



Le Monday 10 November 2008 20:09:21 Johannes Schindelin, vous avez écrit :
> Hi,
>
> On Mon, 10 Nov 2008, Francis Galiegue wrote:
> > In xdiff-interface.c, the FIRST_FEW_BYTES macro is defined, is never
> > used anwhere else, so we might as well undefine it after we're done with
> > it.
>
> Would not the consequence be that we end up with a ton of #undefines all
> over the place, reducing readability incredibly?
>

Hmwell, this is a twofold argument, I guess...

* for: the macro is defined, not undefined: it means that potentially, it can 
be used somewhere else in the file; but it isn't (in this case);
* against: macros defined in a C file only ever have scope in said file 
(unless so mischievous Makefile cats two C files together before compile and 
file order is important -- but git doesn't do that), so why #undefine 
anything?

Personally, I'm with the first argument. YMMV, of course.

-- 
fge
--
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