Re: remove unnecessary explicit type conversion (to char) for appendStringInfoChar function calls

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: remove unnecessary explicit type conversion (to char) for appendStringInfoChar function calls
Date: 2025-04-13 14:14:15
Message-ID: aecf01fe-dbf1-4892-8d39-d58dc60f78e6@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2025-04-13 Su 8:12 AM, Álvaro Herrera wrote:
> On 2025-Apr-12, Andrew Dunstan wrote:
>
>> Seems odd that this one is necessary at all. Doesn't a StringInfo always
>> have a trailing null byte?
> AFAICT what this is doing that's significant, is increment StringInfo->len.
> Before doing it, the NUL byte is not part of the message; afterwards it
> is.
>

That make sense, but then it would be nice to have the accompanying
comment a bit clearer.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2025-04-13 15:19:29 Re: Buildfarm: Enabling injection points on basilisk/dogfish (Alpine / musl)
Previous Message 贾明伟 2025-04-13 13:17:36 Re: CSN snapshots in hot standby