From b000180b0f467851525aae3d0dfb8ab3a9dbcf8f Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Wed, 13 Feb 2019 12:15:24 +0100 Subject: fs: ext4: constify the buffer passed to write functions There is no need to modify the buffer passed to ext4fs_write_file(). The memset() call is not required here and was likely copied from the equivalent part of the ext4fs_read_file() function where we do need it. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tom Rini --- include/ext4fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/ext4fs.h b/include/ext4fs.h index 4b5de6e7b63..7d48b2bc465 100644 --- a/include/ext4fs.h +++ b/include/ext4fs.h @@ -134,7 +134,7 @@ extern int gindex; int ext4fs_init(void); void ext4fs_deinit(void); int ext4fs_filename_unlink(char *filename); -int ext4fs_write(const char *fname, unsigned char *buffer, +int ext4fs_write(const char *fname, const char *buffer, unsigned long sizebytes); int ext4_write_file(const char *filename, void *buf, loff_t offset, loff_t len, loff_t *actwrite); -- cgit v1.2.3