Re: suspicous looking code in copy.c

From: Dave Cramer <dave(at)fastcrypt(dot)com>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: suspicous looking code in copy.c
Date: 2003-08-28 13:39:59
Message-ID: 1062077999.1596.2.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Well, it get's worse, I think after bruce ran pgindent it was turned
into

datasize = -avail;

Dave
On Thu, 2003-08-28 at 08:19, Andreas Pflug wrote:
> Dave Cramer wrote:
>
> >This just doesn't look right.
> >
> >line 364
> > case COPY_NEW_FE:
> >
> > while (datasize > 0 && !fe_eof)
> > ....
> >
> >line 408 datasize =- avail;
> >
> >
> >shouldn't it be datasize -= avail ?
> >
> >
> AFAIR this is a really outdated K&R style of -= . Compilers *should*
> recognize this (and will throw an ambiguity error if there's no space
> after =- ), but it's better to use the 'newer' style.
>
> Regards,
> Andreas
>
--
Dave Cramer <dave(at)fastcrypt(dot)com>
fastcrypt

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-08-28 13:49:47 Re: suspicous looking code in copy.c
Previous Message Tom Lane 2003-08-28 13:23:34 Re: Possible bug in update?