On 10/22/2015 12:36 AM, Alvaro Herrera wrote:
Andres Freund wrote:
That seems fairly insignificant. For one this is a rather infrequent and
expensive operation, for another every decent compiler can optimize
those away. Note that those duplicate strlen() calls are there in a lot
of places in walsender.c
diff --git a/src/backend/replication/walsender.c
b/src/backend/replication/walsender.c
index c6043cd..5487cc0 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -762,10 +762,10 @@ logical_read_xlog_page(XLogReaderState *state, XLogRecPtr
targetPagePtr, int req
static void
CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
{
- const char *slot_name;
const char *snapshot_name = NULL;
char xpos[MAXFNAMELEN];
StringInfoData buf;
+ int len;
Surely "size_t len" ?
Or am I missing some platform where size_t is not defined ?
Minor nitpicking, of course. But once we are cleaning the code up,
might as well change this too....
Thanks!
/ J.L.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers