mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Remove unnecessary (char *) casts [string]
Remove (char *) casts around string functions where the arguments or result already have the right type and the cast is useless (or worse, potentially casts away a qualifier, but this doesn't appear to be the case here). 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:
@@ -267,7 +267,7 @@ RequestXLogStreaming(TimeLineID tli, XLogRecPtr recptr, const char *conninfo,
|
||||
walrcv->walRcvState == WALRCV_WAITING);
|
||||
|
||||
if (conninfo != NULL)
|
||||
strlcpy((char *) walrcv->conninfo, conninfo, MAXCONNINFO);
|
||||
strlcpy(walrcv->conninfo, conninfo, MAXCONNINFO);
|
||||
else
|
||||
walrcv->conninfo[0] = '\0';
|
||||
|
||||
@@ -279,7 +279,7 @@ RequestXLogStreaming(TimeLineID tli, XLogRecPtr recptr, const char *conninfo,
|
||||
*/
|
||||
if (slotname != NULL && slotname[0] != '\0')
|
||||
{
|
||||
strlcpy((char *) walrcv->slotname, slotname, NAMEDATALEN);
|
||||
strlcpy(walrcv->slotname, slotname, NAMEDATALEN);
|
||||
walrcv->is_temp_slot = false;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user