[PATCH 1/4] xfs_db: pass const pointers when we're not modifying them

Darrick J. Wong
2025-02-06T23:02:46Z

Pass a const pointer to path_walk since we don't actually modify the
contents.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
db/namei.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/db/namei.c b/db/namei.c
index 4eae4e8fd3232c..00610a54af527e 100644
--- a/db/namei.c
+++ b/db/namei.c
@@ -140,10 +140,10 @@ path_navigate(
static int
path_walk(
xfs_ino_t rootino,
- char *path)
+ const char *path)
{
struct dirpath *dirpath;
- char *p = path;
+ const char *p = path;
int error = 0;

if (*p == '/') {