1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +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:
Peter Eisentraut
2025-02-12 08:49:18 +01:00
parent 0bc34ad692
commit 506183bce7
6 changed files with 18 additions and 18 deletions

View File

@ -308,13 +308,13 @@ IsVowel(metastring *s, int pos)
static int
SlavoGermanic(metastring *s)
{
if ((char *) strstr(s->str, "W"))
if (strstr(s->str, "W"))
return 1;
else if ((char *) strstr(s->str, "K"))
else if (strstr(s->str, "K"))
return 1;
else if ((char *) strstr(s->str, "CZ"))
else if (strstr(s->str, "CZ"))
return 1;
else if ((char *) strstr(s->str, "WITZ"))
else if (strstr(s->str, "WITZ"))
return 1;
else
return 0;