{"thread":{"id":"16252","subject":"[PATCH] very small cleanup: #undef a macro that isn't used anywhere else","startedAt":"2008-11-10T18:28:27Z","lastAt":"2008-11-10T19:09:58Z","messageCount":3,"participants":["Francis Galiegue","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"95355","messageId":"200811101928.27207.fg@one2team.net","threadId":"16252","inReplyTo":null,"subject":"[PATCH] very small cleanup: #undef a macro that isn't used anywhere else","fromName":"Francis Galiegue","fromEmail":"fg@one2team.net","sentAt":"2008-11-10T18:28:27Z","receivedAt":"2008-11-10T18:28:27Z","isPatch":true,"sender":{"key":"fg@one2team.net","avatar":null},"body":"\nIn xdiff-interface.c, the FIRST_FEW_BYTES macro is defined, is never used\nanwhere else, so we might as well undefine it after we're done with it.\n---\n xdiff-interface.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/xdiff-interface.c b/xdiff-interface.c\nindex e8ef46d..2cf30cd 100644\n--- a/xdiff-interface.c\n+++ b/xdiff-interface.c\n@@ -226,6 +226,7 @@ int buffer_is_binary(const char *ptr, unsigned long size)\n                size = FIRST_FEW_BYTES;\n        return !!memchr(ptr, 0, size);\n }\n+#undef FIRST_FEW_BYTES\n\n struct ff_regs {\n        int nr;\n--\n1.6.0.3\n\n\n-- \nfge\n"},{"id":"95356","messageId":"alpine.DEB.1.00.0811102008330.30769@pacific.mpi-cbg.de","threadId":"16252","inReplyTo":"200811101928.27207.fg@one2team.net","subject":"Re: [PATCH] very small cleanup: #undef a macro that isn't used anywhere else","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-11-10T19:09:21Z","receivedAt":"2008-11-10T19:09:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 10 Nov 2008, Francis Galiegue wrote:\n\n> In xdiff-interface.c, the FIRST_FEW_BYTES macro is defined, is never \n> used anwhere else, so we might as well undefine it after we're done with \n> it.\n\nWould not the consequence be that we end up with a ton of #undefines all \nover the place, reducing readability incredibly?\n\nCiao,\nDscho\n"},{"id":"95358","messageId":"200811102009.58332.fg@one2team.net","threadId":"16252","inReplyTo":"alpine.DEB.1.00.0811102008330.30769@pacific.mpi-cbg.de","subject":"Re: [PATCH] very small cleanup: #undef a macro that isn't used anywhere else","fromName":"Francis Galiegue","fromEmail":"fg@one2team.net","sentAt":"2008-11-10T19:09:58Z","receivedAt":"2008-11-10T19:09:58Z","isPatch":true,"sender":{"key":"fg@one2team.net","avatar":null},"body":"Le Monday 10 November 2008 20:09:21 Johannes Schindelin, vous avez écrit :\n> Hi,\n>\n> On Mon, 10 Nov 2008, Francis Galiegue wrote:\n> > In xdiff-interface.c, the FIRST_FEW_BYTES macro is defined, is never\n> > used anwhere else, so we might as well undefine it after we're done with\n> > it.\n>\n> Would not the consequence be that we end up with a ton of #undefines all\n> over the place, reducing readability incredibly?\n>\n\nHmwell, this is a twofold argument, I guess...\n\n* for: the macro is defined, not undefined: it means that potentially, it can \nbe used somewhere else in the file; but it isn't (in this case);\n* against: macros defined in a C file only ever have scope in said file \n(unless so mischievous Makefile cats two C files together before compile and \nfile order is important -- but git doesn't do that), so why #undefine \nanything?\n\nPersonally, I'm with the first argument. YMMV, of course.\n\n-- \nfge\n"}]}