summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/metaentry.c4
-rw-r--r--src/utils.c6
-rw-r--r--src/utils.h6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/metaentry.c b/src/metaentry.c
index a26c764..891e0c4 100644
--- a/src/metaentry.c
+++ b/src/metaentry.c
@@ -451,8 +451,8 @@ mentries_fromfile(struct metahash **mhash, const char *path)
{
struct metaentry *mentry;
char *mmapstart;
- char *ptr;
- char *max;
+ char const *ptr;
+ char const *max;
int fd;
struct stat sbuf;
unsigned i;
diff --git a/src/utils.c b/src/utils.c
index b086900..87292e3 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -145,7 +145,7 @@ write_string(const char *string, FILE *to)
/* Reads an int from a file, using len bytes, in little-endian order */
uint64_t
-read_int(char **from, size_t len, const char *max)
+read_int(const char **from, size_t len, const char *max)
{
uint64_t result = 0;
size_t i;
@@ -164,7 +164,7 @@ read_int(char **from, size_t len, const char *max)
/* Reads a binary string from a file */
char *
-read_binary_string(char **from, size_t len, const char *max)
+read_binary_string(const char **from, size_t len, const char *max)
{
char *result;
@@ -182,7 +182,7 @@ read_binary_string(char **from, size_t len, const char *max)
/* Reads a normal C string from a file */
char *
-read_string(char **from, const char *max)
+read_string(const char **from, const char *max)
{
return read_binary_string(from, strlen(*from) + 1, max);
}
diff --git a/src/utils.h b/src/utils.h
index 586a7f3..35209d1 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -69,13 +69,13 @@ void write_binary_string(const char *string, size_t len, FILE *to);
void write_string(const char *string, FILE *to);
/* Reads an int from a file, using len bytes, in little-endian order */
-uint64_t read_int(char **from, size_t len, const char *max);
+uint64_t read_int(const char **from, size_t len, const char *max);
/* Reads a binary string from a file */
-char *read_binary_string(char **from, size_t len, const char *max);
+char *read_binary_string(const char **from, size_t len, const char *max);
/* Reads a normal C string from a file */
-char *read_string(char **from, const char *max);
+char *read_string(const char **from, const char *max);
/* Caching version of getgrnam */
struct group *xgetgrnam(const char *name);