diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-01-20 14:23:09 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-01-20 16:33:03 +0100 |
commit | d40e6e14769aed5e0d024752037d5b42a71f6063 (patch) | |
tree | 56106d6ce1bde5fbdc051276f034abf01dcc715f /common/filetype.c | |
parent | 0e18d5ae7ff82a455c0d46291d67a894b86b82a1 (diff) | |
download | barebox-d40e6e14769aed5e0d024752037d5b42a71f6063.tar.gz barebox-d40e6e14769aed5e0d024752037d5b42a71f6063.tar.xz |
filetype: Make buf in file_detect_type const
This function has no business changing the buffer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/filetype.c')
-rw-r--r-- | common/filetype.c | 10 |
1 files changed, 5 insertions, 5 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) |