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
This commit is contained in:
Faraz Vahedi committed 2026-09-19 13:45:10 +03:30
1 parent 066fad8aef
commit cc61cc7b63
1 file changed
+2 -2
+2 -2
View File
@@ -436,8 +436,8 @@ printdev(size_t width, dev_t dev)
static void static void
ls_strftime(char *str, size_t len, const char *fmt, const struct tm *tm) ls_strftime(char *str, size_t len, const char *fmt, const struct tm *tm)
{ {
char *posb, nfmt[BUFSIZ]; char nfmt[BUFSIZ];
const char *format = fmt; const char *posb, *format = fmt;
if ((posb = strstr(fmt, "%b")) != NULL) { if ((posb = strstr(fmt, "%b")) != NULL) {
if (month_max_size == 0) { if (month_max_size == 0) {