At Thu, 25 Feb 2021 21:04:00 -0300, Álvaro Herrera <alvhe...@alvh.no-ip.org> 
wrote in 
> This assert I added?
> 
> > +static bool
> > +pqTraceMaybeBreakLine(int size, PGconn *conn)
> > +{
> > +   Assert(conn->be_msg->length > 0);
> 
> It breaks.  Maybe there's a good reason, maybe there ain't, but in the
> meantime I just removed it.

The assertion contradicts the condition just below.

|       Assert(conn->be_msg->length > 0);
|
|       conn->be_msg->length -= size;
|       if (conn->be_msg->length <= 0)

It seems to me that the assertion was inteded to be placed after
subtracting size, and the operator > is inteded to be >=.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


Reply via email to