diff options
author | Adam Spragg <adam@spra.gg> | 2022-05-16 10:47:24 +0100 |
---|---|---|
committer | Adam Spragg <adam@spra.gg> | 2022-05-18 17:19:40 +0100 |
commit | f73bd1a104ebfe424bec72a97d51bfa64064892c (patch) | |
tree | 3ae2c95cd979f786f59a5288287c3429f6108323 /src/utils.h | |
parent | 527214c7ee648cccbe4abbb11bde298b7b52141b (diff) |
Make buffers that are read from `const`-correct
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 6 |
1 files changed, 3 insertions, 3 deletions
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); |