Wrong comment for bitncmp function in network.c

Lists: pgsql-hackers
From: Emre Hasegeli <emre(at)hasegeli(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Wrong comment for bitncmp function in network.c
Date: 2014-01-04 12:19:49
Message-ID: CAE2gYzx4dVxEpUcrUX6+Rxb=2ivVtrtoRPRKjfCRgcYqkX44Xg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I am not sure it worth reporting but it took me a while to find out
what is wrong with comparing two values returned from
the bitncmp function. It does not return -1, 1 or 0 as it is written
on the comment when n % 8 == 0.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: emre(at)hasegeli(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Wrong comment for bitncmp function in network.c
Date: 2014-01-04 18:40:40
Message-ID: 20019.1388860840@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Emre Hasegeli <emre(at)hasegeli(dot)com> writes:
> I am not sure it worth reporting but it took me a while to find out
> what is wrong with comparing two values returned from
> the bitncmp function. It does not return -1, 1 or 0 as it is written
> on the comment when n % 8 == 0.

Yeah, should say "<0, >0, or 0", I guess. Will fix, thanks.

regards, tom lane