Re: [HACKERS] removal of braces

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] removal of braces
Date: 1998-06-15 20:55:17
Message-ID: 199806152055.QAA13926@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> I have written a script to remove braces around single statements, if
> the statement is only one line in length.
>
> The macro fixup context diff was 1,200 lines, and this diff is 12k
> lines.
>
> Hope no one is sitting on patches.

They had things like:

if (test != 0)
macro;

while the macro was:

#define macro() \
stmt1; \
stmt2; \
stmt3;

Of course, only the stmt1 is conditional. The rest are always executed.
I am sure there were some bugs fixed by this cleanup.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Gould 1998-06-15 20:59:58 Re: [HACKERS] removal of braces
Previous Message David Gould 1998-06-15 20:26:14 Revised Optimized S_LOCK patch