]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: pass const pointers when we're not modifying them
authorDarrick J. Wong <djwong@kernel.org>
Mon, 24 Feb 2025 18:22:07 +0000 (10:22 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 25 Feb 2025 17:16:03 +0000 (09:16 -0800)
Pass a const pointer to path_walk since we don't actually modify the
contents.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
db/namei.c

index 4eae4e8fd3232cf7f5172a9d46ddf06a090bb361..00610a54af527e64fa948414c247cc79fea5aeec 100644 (file)
@@ -140,10 +140,10 @@ rele:
 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 == '/') {