find: Fix items from the review I missed for printf

Minor fixes I missed in a review comment until after the commit.

Pointy-hat-to: imp
Fixes: 7b9c912c41
Sponsored by: Netflix
This commit is contained in:
Warner Losh 2025-07-25 16:24:49 -06:00
parent 015ae66889
commit fd186cd16e
2 changed files with 5 additions and 2 deletions

View file

@ -1450,7 +1450,10 @@ c_printf(OPTION *option, char ***argvp)
PLAN *new;
isoutput = 1;
ftsoptions &= ~FTS_NOSTAT;
/*
* XXX We could scan the format looking for stat-dependent formats, and
* turn off the stat if there's none: `%p`/`%f`/`%h` don't need a stat.
*/
new = palloc(option);
new->c_data = nextarg(option, argvp);

View file

@ -279,7 +279,7 @@ do_printf(PLAN *plan, FTSENT *entry, FILE *fout)
case 'c': /* status change time ctime */
fp_ctime(fp, sb->st_ctime);
break;
case 'C': /* statuc change time with next char strftime format */
case 'C': /* status change time with next char strftime format */
fp_strftime(fp, sb->st_ctime, *fmt++);
break;
case 't': /* modification change time ctime */