ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 4/4] lib: tst_device: Constify array members
Date: Tue, 28 Mar 2023 15:19:35 +0200	[thread overview]
Message-ID: <20230328131935.21945-5-chrubis@suse.cz> (raw)
In-Reply-To: <20230328131935.21945-1-chrubis@suse.cz>

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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2023-03-28 13:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 13:19 [LTP] [PATCH 0/4] Minor fixes for tst_device Cyril Hrubis
2023-03-28 13:19 ` [LTP] [PATCH 1/4] lib: include tst_device.h in tst_device.c Cyril Hrubis
2023-03-28 13:19 ` [LTP] [PATCH 2/4] lib: tst_device: Make find_stat_file() static Cyril Hrubis
2023-03-28 13:19 ` [LTP] [PATCH 3/4] lib: tst_device: Switch to SPDX Cyril Hrubis
2023-03-28 13:19 ` Cyril Hrubis [this message]
2023-03-29  5:16 ` [LTP] [PATCH 0/4] Minor fixes for tst_device Li Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230328131935.21945-5-chrubis@suse.cz \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).