From 3e4d868615408370fe6c2977c32f45a47c372b00 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 20 Feb 2025 19:49:27 +0100 Subject: Remove various unnecessary (char *) casts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove a number of (char *) casts that are unnecessary. Or in some cases, rewrite the code to make the purpose of the cast clearer. Reviewed-by: Dagfinn Ilmari Mannsåker Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b97f2db6c7%40eisentraut.org --- contrib/postgres_fdw/postgres_fdw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contrib/postgres_fdw/postgres_fdw.c') diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index b92e2a0fc9f..de43727a2a0 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -5660,13 +5660,13 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid) attname = PQgetvalue(res, i, 1); typename = PQgetvalue(res, i, 2); attnotnull = PQgetvalue(res, i, 3); - attdefault = PQgetisnull(res, i, 4) ? (char *) NULL : + attdefault = PQgetisnull(res, i, 4) ? NULL : PQgetvalue(res, i, 4); - attgenerated = PQgetisnull(res, i, 5) ? (char *) NULL : + attgenerated = PQgetisnull(res, i, 5) ? NULL : PQgetvalue(res, i, 5); - collname = PQgetisnull(res, i, 6) ? (char *) NULL : + collname = PQgetisnull(res, i, 6) ? NULL : PQgetvalue(res, i, 6); - collnamespace = PQgetisnull(res, i, 7) ? (char *) NULL : + collnamespace = PQgetisnull(res, i, 7) ? NULL : PQgetvalue(res, i, 7); if (first_item) -- cgit v1.2.3