From d40e6e14769aed5e0d024752037d5b42a71f6063 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Sun, 20 Jan 2013 14:23:09 +0100 Subject: filetype: Make buf in file_detect_type const This function has no business changing the buffer. Signed-off-by: Sascha Hauer --- common/filetype.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'common/filetype.c') 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) -- cgit v1.2.3