summaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorAdam Spragg <adam@spra.gg>2022-05-16 10:47:24 +0100
committerAdam Spragg <adam@spra.gg>2022-05-18 17:19:40 +0100
commitf73bd1a104ebfe424bec72a97d51bfa64064892c (patch)
tree3ae2c95cd979f786f59a5288287c3429f6108323 /src/utils.c
parent527214c7ee648cccbe4abbb11bde298b7b52141b (diff)
Make buffers that are read from `const`-correct
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 3 insertions, 3 deletions
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);
}