summaryrefslogtreecommitdiff
path: root/contrib/dblink
diff options
context:
space:
mode:
authorJohn Naylor2023-11-30 08:25:57 +0000
committerJohn Naylor2023-11-30 08:25:57 +0000
commit095d109ccd76ca4c46c4ea2be30d63d70361c5f9 (patch)
tree70d43b54aec0ea4e0d3a2521ca7dfa58c9f1ff1b /contrib/dblink
parent489ca33081c8f590a314d4a09d9bee56a81f1a85 (diff)
Remove redundant setting of hashkey after insertion
It's not necessary to fill the key field in most cases, since hash_search has already done that. Some existing call sites have an assert or comment that this contract has been fulfilled, but those are quite old and that practice seems unnecessary here. While at it, remove a nearby redundant assignment that a smart compiler will elide anyway. Zhao Junwang, with some adjustments by me Reviewed by Nathan Bossart, with additional feedback from Tom Lane Discussion: http://postgr.es/m/CAEG8a3%2BUPF%3DR2QGPgJMF2mKh8xPd1H2TmfH77zPuVUFdBpiGUA%40mail.gmail.com
Diffstat (limited to 'contrib/dblink')
-rw-r--r--contrib/dblink/dblink.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index 195b278f559..27bd0d31fdf 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -2574,7 +2574,6 @@ createNewConnection(const char *name, remoteConn *rconn)
}
hentry->rconn = rconn;
- strlcpy(hentry->name, name, sizeof(hentry->name));
}
static void