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>
This commit is contained in:
Krzysztof Kozlowski 2017-03-05 23:44:35 +02:00 committed by Kevin Wolf
parent 81b2d5ceb0
commit 0731a50feb
2 changed files with 2 additions and 2 deletions

View file

@ -420,7 +420,7 @@ void monitor_remove_blk(BlockBackend *blk)
* Return @blk's name, a non-null string.
* Returns an empty string iff @blk is not referenced by the monitor.
*/
const char *blk_name(BlockBackend *blk)
const char *blk_name(const BlockBackend *blk)
{
return blk->name ?: "";
}