summaryrefslogtreecommitdiff
path: root/lib/isc/unix/file.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2016-09-28 03:45:43 +0000
committerXin LI <delphij@FreeBSD.org>2016-09-28 03:45:43 +0000
commitc2a8859aa5c96190c179c911d3841c4de17b9c34 (patch)
treed692d2581f8989d075abe40c9f3f55f2fa650949 /lib/isc/unix/file.c
parent5ef882476736cbe802bb4e6437c520162c4f44ce (diff)
Diffstat (limited to 'lib/isc/unix/file.c')
-rw-r--r--lib/isc/unix/file.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/isc/unix/file.c b/lib/isc/unix/file.c
index c2abd440e18cd..3fc2a29125c47 100644
--- a/lib/isc/unix/file.c
+++ b/lib/isc/unix/file.c
@@ -204,8 +204,9 @@ isc_file_mktemplate(const char *path, char *buf, size_t buflen) {
isc_result_t
isc_file_template(const char *path, const char *templet, char *buf,
- size_t buflen) {
- char *s;
+ size_t buflen)
+{
+ const char *s;
REQUIRE(path != NULL);
REQUIRE(templet != NULL);
@@ -262,7 +263,7 @@ isc_file_renameunique(const char *file, char *templet) {
if (errno != EEXIST)
return (isc__errno2result(errno));
for (cp = x;;) {
- char *t;
+ const char *t;
if (*cp == '\0')
return (ISC_R_FAILURE);
t = strchr(alphnum, *cp);
@@ -461,7 +462,7 @@ isc_file_ischdiridempotent(const char *filename) {
const char *
isc_file_basename(const char *filename) {
- char *s;
+ const char *s;
REQUIRE(filename != NULL);
@@ -579,9 +580,11 @@ isc_file_safecreate(const char *filename, FILE **fp) {
}
isc_result_t
-isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirname, char **basename)
+isc_file_splitpath(isc_mem_t *mctx, const char *path, char **dirname,
+ char const **basename)
{
- char *dir, *file, *slash;
+ char *dir;
+ const char *file, *slash;
if (path == NULL)
return (ISC_R_INVALIDFILE);