Re: suspicous looking code in copy.c - Mailing list pgsql-hackers

From Dave Cramer
Subject Re: suspicous looking code in copy.c
Date
Msg-id 1062077999.1596.2.camel@localhost.localdomain
Whole thread Raw
In response to Re: suspicous looking code in copy.c  (Andreas Pflug <pgadmin@pse-consulting.de>)
List 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@fastcrypt.com>
fastcrypt



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Possible bug in update?
Next
From: Tom Lane
Date:
Subject: Re: suspicous looking code in copy.c