diff options
-rw-r--r-- | common/filetype.c | 10 | ||||
-rw-r--r-- | include/filetype.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/common/filetype.c b/common/filetype.c index 748e364e65..5941ad23a9 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -106,12 +106,12 @@ enum filetype is_fat_or_mbr(const unsigned char *sector, unsigned long *bootsec) return filetype_mbr; } -enum filetype file_detect_type(void *_buf, size_t bufsize) +enum filetype file_detect_type(const void *_buf, size_t bufsize) { - u32 *buf = _buf; - u64 *buf64 = _buf; - u8 *buf8 = _buf; - u16 *buf16 = _buf; + const u32 *buf = _buf; + const u64 *buf64 = _buf; + const u8 *buf8 = _buf; + const u16 *buf16 = _buf; enum filetype type; if (bufsize < 9) diff --git a/include/filetype.h b/include/filetype.h index 91139dbfe3..502b920927 100644 --- a/include/filetype.h +++ b/include/filetype.h @@ -30,7 +30,7 @@ enum filetype { const char *file_type_to_string(enum filetype f); const char *file_type_to_short_string(enum filetype f); -enum filetype file_detect_type(void *_buf, size_t bufsize); +enum filetype file_detect_type(const void *_buf, size_t bufsize); enum filetype file_name_detect_type(const char *filename); enum filetype is_fat_or_mbr(const unsigned char *sector, unsigned long *bootsec); |