diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2022-12-30 10:02:59 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2022-12-30 10:12:24 +0100 |
commit | 5f2f99c9c62d754c19e090cb57fdd929438ea519 (patch) | |
tree | d53db6531735a581bf660a0e7ed1d5cfd7bae31b /src/backend/storage/file/buffile.c | |
parent | 388e80132c007a7528abc987e347e41432dc1542 (diff) | |
download | postgresql-5f2f99c9c62d754c19e090cb57fdd929438ea519.tar.gz postgresql-5f2f99c9c62d754c19e090cb57fdd929438ea519.zip |
Remove unnecessary casts
Some code carefully cast all data buffer arguments for data write and
read function calls to void *, even though the respective arguments
are already void *. Remove this unnecessary clutter.
Discussion: https://www.postgresql.org/message-id/flat/11dda853-bb5b-59ba-a746-e168b1ce4bdb%40enterprisedb.com
Diffstat (limited to 'src/backend/storage/file/buffile.c')
-rw-r--r-- | src/backend/storage/file/buffile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c index b0b4eeb3bdd..b07cca28d60 100644 --- a/src/backend/storage/file/buffile.c +++ b/src/backend/storage/file/buffile.c @@ -607,7 +607,7 @@ BufFileRead(BufFile *file, void *ptr, size_t size) memcpy(ptr, file->buffer.data + file->pos, nthistime); file->pos += nthistime; - ptr = (void *) ((char *) ptr + nthistime); + ptr = (char *) ptr + nthistime; size -= nthistime; nread += nthistime; } @@ -655,7 +655,7 @@ BufFileWrite(BufFile *file, void *ptr, size_t size) file->pos += nthistime; if (file->nbytes < file->pos) file->nbytes = file->pos; - ptr = (void *) ((char *) ptr + nthistime); + ptr = (char *) ptr + nthistime; size -= nthistime; } } |