[LTP] [PATCH 4/4] lib: tst_device: Constify array members

Cyril Hrubis chrubis@suse.cz
Tue Mar 28 15:19:35 CEST 2023


tst_device.c:40: WARNING: static const char * array should probably be static const char * const
tst_device.c:46: WARNING: static const char * array should probably be static const char * const

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 lib/tst_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/tst_device.c b/lib/tst_device.c
index a4dfda5ba..d659b54cf 100644
--- a/lib/tst_device.c
+++ b/lib/tst_device.c
@@ -37,13 +37,13 @@ static char dev_path[PATH_MAX];
 static int device_acquired;
 static unsigned long prev_dev_sec_write;
 
-static const char *dev_loop_variants[] = {
+static const char * const dev_loop_variants[] = {
 	"/dev/loop%i",
 	"/dev/loop/%i",
 	"/dev/block/loop%i"
 };
 
-static const char *dev_variants[] = {
+static const char * const dev_variants[] = {
 	"/dev/%s",
 	"/dev/block/%s"
 };
-- 
2.39.2



More information about the ltp mailing list