From 7a72ea0e78d6df373ba1d8b941a0070ddff8c440 Mon Sep 17 00:00:00 2001 From: jb Date: Sun, 27 Jan 2008 01:19:47 +0000 Subject: fts_pathlen is now a size_t rather than an int so a cast is needed. I'm not sure why warn() and err() string formatted variables need to be right-justified. --- usr.sbin/setfmac/setfmac.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'usr.sbin/setfmac/setfmac.c') diff --git a/usr.sbin/setfmac/setfmac.c b/usr.sbin/setfmac/setfmac.c index 9655cf3..fab2a66 100644 --- a/usr.sbin/setfmac/setfmac.c +++ b/usr.sbin/setfmac/setfmac.c @@ -157,12 +157,12 @@ main(int argc, char **argv) if (apply_specs(specs, ftsent, hflag, vflag)) { if (eflag) { errx(1, "labeling not supported in " - "%.*s", ftsent->fts_pathlen, + "%.*s", (int) ftsent->fts_pathlen, ftsent->fts_path); } if (!qflag) warnx("labeling not supported in %.*s", - ftsent->fts_pathlen, + (int) ftsent->fts_pathlen, ftsent->fts_path); fts_set(fts, ftsent, FTS_SKIP); } @@ -170,11 +170,11 @@ main(int argc, char **argv) case FTS_DNR: /* die on all errors */ case FTS_ERR: case FTS_NS: - err(1, "traversing %.*s", ftsent->fts_pathlen, + err(1, "traversing %.*s", (int) ftsent->fts_pathlen, ftsent->fts_path); default: errx(1, "CANNOT HAPPEN (%d) traversing %.*s", - ftsent->fts_info, ftsent->fts_pathlen, + ftsent->fts_info, (int) ftsent->fts_pathlen, ftsent->fts_path); } } @@ -439,7 +439,7 @@ apply_specs(struct label_specs *specs, FTSENT *ftsent, int hflag, int vflag) if (vflag) { if (matchedby == 0) { printf("%.*s matched by ", - ftsent->fts_pathlen, + (int) ftsent->fts_pathlen, ftsent->fts_path); matchedby = 1; } @@ -483,7 +483,7 @@ apply_specs(struct label_specs *specs, FTSENT *ftsent, int hflag, int vflag) free(macstr); return (1); } - err(1, "mac_set_link(%.*s, %s)", ftsent->fts_pathlen, + err(1, "mac_set_link(%.*s, %s)", (int) ftsent->fts_pathlen, ftsent->fts_path, macstr); } mac_free(mac); -- cgit v1.1