broken dead code in pg_lzcompress.h

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org, Jan Wieck <JanWieck(at)Yahoo(dot)com>
Subject: broken dead code in pg_lzcompress.h
Date: 2006-10-05 21:04:55
Message-ID: 1501.1160082295@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I came across the following obviously corrupt macro in pg_lzcompress.h:

#define PGLZ_IS_COMPRESSED(_lzdata) ((_lzdata)->varsize != \
e (_lzdata)->rawsize + e \
sizeof(PGLZ_Header))
The reason we have not noticed its brokenness is that it's only used in
macro pglz_decomp_init, which is used nowhere. In fact there seems to
be quite a lot of dead code in this header. I'm inclined to remove
everything that's not referenced, rather than try to fix it.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2006-10-05 21:17:07 Re: broken dead code in pg_lzcompress.h
Previous Message Martijn van Oosterhout 2006-10-05 20:53:19 Re: Upgrading a database dump/restore