]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsfd: fix const qualifier warning in strnrstr
authorKarel Zak <kzak@redhat.com>
Thu, 27 Nov 2025 15:38:18 +0000 (16:38 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 27 Nov 2025 15:38:18 +0000 (16:38 +0100)
commit935f2ab21add95059a92208f69ef578708307481
tree782df3c326e0e1940071cf8e0f592b26ff73cd6a
parent014d2779afb4118d7117442eeed562e2c7b7594f
lsfd: fix const qualifier warning in strnrstr

Fix const qualifier discarded warning in strnrstr().
This warning is reported by gcc 15 which defaults to the C23 standard.

The function returns a non-const pointer into the haystack parameter,
and callers modify the string through that pointer. Therefore, the
haystack parameter should be char * rather than const char *.

Signed-off-by: Karel Zak <kzak@redhat.com>
lsfd-cmd/file.c