diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 98697ba2b06f..823376964bd1 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -287,8 +287,7 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) case FTS_NS: case FTS_DNR: case FTS_ERR: - warnx("%s: %s", - curr->fts_path, strerror(curr->fts_errno)); + warnc(curr->fts_errno, "%s", curr->fts_path); badcp = rval = 1; continue; case FTS_DC: /* Warn, continue. */