aboutsummaryrefslogtreecommitdiff
path: root/contrib/xml2/xpath.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-02-12 08:50:13 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-02-12 08:50:13 +0100
commit827b4060a8e35047c1adc9ca2ab3d8e7ad905df0 (patch)
tree1235f34ef0ea04f9ccb22dd8f9c648e0e9c3ed06 /contrib/xml2/xpath.c
parent506183bce73a2b22308a54876f0a56a249bc26e9 (diff)
downloadpostgresql-827b4060a8e35047c1adc9ca2ab3d8e7ad905df0.tar.gz
postgresql-827b4060a8e35047c1adc9ca2ab3d8e7ad905df0.zip
Remove unnecessary (char *) casts [mem]
Remove (char *) casts around memory functions such as memcmp(), memcpy(), or memset() where the cast is useless. Since these functions don't take char * arguments anyway, these casts are at best complicated casts to (void *), about which see commit 7f798aca1d5. Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b97f2db6c7%40eisentraut.org
Diffstat (limited to 'contrib/xml2/xpath.c')
-rw-r--r--contrib/xml2/xpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c
index f7e3f485fe1..19180b9a6c2 100644
--- a/contrib/xml2/xpath.c
+++ b/contrib/xml2/xpath.c
@@ -278,8 +278,8 @@ xpath_string(PG_FUNCTION_ARGS)
/* We could try casting to string using the libxml function? */
xpath = (xmlChar *) palloc(pathsize + 9);
- memcpy((char *) xpath, "string(", 7);
- memcpy((char *) (xpath + 7), VARDATA_ANY(xpathsupp), pathsize);
+ memcpy(xpath, "string(", 7);
+ memcpy(xpath + 7, VARDATA_ANY(xpathsupp), pathsize);
xpath[pathsize + 7] = ')';
xpath[pathsize + 8] = '\0';