dfu: flash_img: Constify flash_img_buffered_write() data parameter
The data passed has no reason to be changed and can therefore be passed as read only. Signed-off-by: Xavier Chapron <xavier.chapron@stimio.fr>
This commit is contained in:
parent
5d91d985e8
commit
57db336b98
2 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ size_t flash_img_bytes_written(struct flash_img_context *ctx);
|
|||
*
|
||||
* @return 0 on success, negative errno code on fail
|
||||
*/
|
||||
int flash_img_buffered_write(struct flash_img_context *ctx, uint8_t *data,
|
||||
int flash_img_buffered_write(struct flash_img_context *ctx, const uint8_t *data,
|
||||
size_t len, bool flush);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -31,7 +31,7 @@ BUILD_ASSERT((CONFIG_IMG_BLOCK_BUF_SIZE % FLASH_WRITE_BLOCK_SIZE == 0),
|
|||
"CONFIG_IMG_BLOCK_BUF_SIZE is not a multiple of "
|
||||
"FLASH_WRITE_BLOCK_SIZE");
|
||||
|
||||
int flash_img_buffered_write(struct flash_img_context *ctx, uint8_t *data,
|
||||
int flash_img_buffered_write(struct flash_img_context *ctx, const uint8_t *data,
|
||||
size_t len, bool flush)
|
||||
{
|
||||
int rc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue