From 0731a50feba67a829b86df6dffec682c821f1152 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sun, 5 Mar 2017 23:44:35 +0200 Subject: 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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Kevin Wolf --- block/block-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block') diff --git a/block/block-backend.c b/block/block-backend.c index 7405024e08..ae3d7713ce 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -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 ?: ""; } -- cgit v1.2.3-55-g7522