diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2017-03-05 23:44:35 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-04-27 15:39:49 +0200 |
commit | 0731a50feba67a829b86df6dffec682c821f1152 (patch) | |
tree | 287169ab1971ece29f3303c756c6e7b37bb680cf /include/sysemu/block-backend.h | |
parent | 81b2d5ceb0cfb4cdc2163492e3169ed714b0cda9 (diff) | |
download | qemu-0731a50feba67a829b86df6dffec682c821f1152.zip qemu-0731a50feba67a829b86df6dffec682c821f1152.tar.gz qemu-0731a50feba67a829b86df6dffec682c821f1152.tar.bz2 |
block: Constify data passed by pointer to blk_name
blk_name() is not modifying data passed to it through pointer and it
returns also a pointer to const so the argument can be made const for
code safeness.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/sysemu/block-backend.h')
-rw-r--r-- | include/sysemu/block-backend.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 7462228..133e542 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -99,7 +99,7 @@ int blk_get_refcnt(BlockBackend *blk); void blk_ref(BlockBackend *blk); void blk_unref(BlockBackend *blk); void blk_remove_all_bs(void); -const char *blk_name(BlockBackend *blk); +const char *blk_name(const BlockBackend *blk); BlockBackend *blk_by_name(const char *name); BlockBackend *blk_next(BlockBackend *blk); bool monitor_add_blk(BlockBackend *blk, const char *name, Error **errp); |