summaryrefslogtreecommitdiff
path: root/src/port/path.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2019-01-29 01:16:24 +0100
committerPeter Eisentraut <peter@eisentraut.org>2019-02-13 11:50:16 +0100
commit37d9916020286caec810f4de61fbd0de3568454d (patch)
treed9d80040f72093664d8a20b55de2a670988d281e /src/port/path.c
parentcf40dc65b676c8df1ee12f060b40f0e37a183e04 (diff)
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
Diffstat (limited to 'src/port/path.c')
-rw-r--r--src/port/path.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/port/path.c b/src/port/path.c
index 661017f8777..4b214e89e4e 100644
--- a/src/port/path.c
+++ b/src/port/path.c
@@ -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);
}