The branch main has been updated by kfv: URL: https://cgit.FreeBSD.org/src/commit/?id=cc61cc7b638a6a1182c0dd0989a7b630759f408c
commit cc61cc7b638a6a1182c0dd0989a7b630759f408c Author: Faraz Vahedi <[email protected]> AuthorDate: 2026-09-19 10:15:10 +0000 Commit: Faraz Vahedi <[email protected]> CommitDate: 2026-09-19 10:15:10 +0000 ls(1): Preserve const qualifier on strstr(3) result Reviewed by: fuz Approved by: fuz (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D59774 --- bin/ls/print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ls/print.c b/bin/ls/print.c index a504ec63dc26..3dfb16672a51 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -436,8 +436,8 @@ printdev(size_t width, dev_t dev) static void ls_strftime(char *str, size_t len, const char *fmt, const struct tm *tm) { - char *posb, nfmt[BUFSIZ]; - const char *format = fmt; + char nfmt[BUFSIZ]; + const char *posb, *format = fmt; if ((posb = strstr(fmt, "%b")) != NULL) { if (month_max_size == 0) {
