mirror of
https://github.com/postgres/postgres.git
synced 2025-12-09 02:08:45 +03:00
Remove useless casting to same type
This removes some casts where the input already has the same type as the type specified by the cast. Their presence could cause risks of hiding actual type mismatches in the future or silently discarding qualifiers. It also improves readability. Same kind of idea as7f798aca1dandef8fe69360. (This does not change all such instances, but only those hand-picked by the author.) Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://www.postgresql.org/message-id/flat/aSQy2JawavlVlEB0%40ip-10-97-1-34.eu-west-3.compute.internal
This commit is contained in:
@@ -327,7 +327,7 @@ GetAt(metastring *s, int pos)
|
||||
if ((pos < 0) || (pos >= s->length))
|
||||
return '\0';
|
||||
|
||||
return ((char) *(s->str + pos));
|
||||
return *(s->str + pos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user