mirror of
https://github.com/postgres/postgres.git
synced 2025-08-14 02:22:38 +03:00
More unconstify use
Replace casts whose only purpose is to cast away const with the unconstify() macro. Discussion: https://www.postgresql.org/message-id/flat/53a28052-f9f3-1808-fed9-460fd43035ab%402ndquadrant.com
This commit is contained in:
@@ -106,7 +106,7 @@ first_dir_separator(const char *filename)
|
||||
|
||||
for (p = skip_drive(filename); *p; p++)
|
||||
if (IS_DIR_SEP(*p))
|
||||
return (char *) p;
|
||||
return unconstify(char *, p);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ first_path_var_separator(const char *pathlist)
|
||||
/* skip_drive is not needed */
|
||||
for (p = pathlist; *p; p++)
|
||||
if (IS_PATH_VAR_SEP(*p))
|
||||
return (char *) p;
|
||||
return unconstify(char *, p);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ last_dir_separator(const char *filename)
|
||||
for (p = skip_drive(filename); *p; p++)
|
||||
if (IS_DIR_SEP(*p))
|
||||
ret = p;
|
||||
return (char *) ret;
|
||||
return unconstify(char *, ret);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user