mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
Remove various unnecessary (char *) casts
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 <ilmari@ilmari.org> Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b97f2db6c7%40eisentraut.org
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
|
||||
/* Copy a field that is a pointer to a C string, or perhaps NULL */
|
||||
#define COPY_STRING_FIELD(fldname) \
|
||||
(newnode->fldname = from->fldname ? pstrdup(from->fldname) : (char *) NULL)
|
||||
(newnode->fldname = from->fldname ? pstrdup(from->fldname) : NULL)
|
||||
|
||||
/* Copy a field that is an inline array */
|
||||
#define COPY_ARRAY_FIELD(fldname) \
|
||||
|
||||
@@ -51,7 +51,7 @@ makeSimpleA_Expr(A_Expr_Kind kind, char *name,
|
||||
A_Expr *a = makeNode(A_Expr);
|
||||
|
||||
a->kind = kind;
|
||||
a->name = list_make1(makeString((char *) name));
|
||||
a->name = list_make1(makeString(name));
|
||||
a->lexpr = lexpr;
|
||||
a->rexpr = rexpr;
|
||||
a->location = location;
|
||||
|
||||
Reference in New Issue
Block a user