mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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 7f798aca1d
.
Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b97f2db6c7%40eisentraut.org
This commit is contained in:
@ -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';
|
||||
|
||||
|
Reference in New Issue
Block a user