diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c index e32b85b777ec..b0d999eae694 100644 --- a/usr.sbin/rarpd/rarpd.c +++ b/usr.sbin/rarpd/rarpd.c @@ -1024,7 +1024,8 @@ expand_syslog_m(const char *fmt, char **newfmt) { p = strdup(""); str = fmt; while ((m = strstr(str, "%m")) != NULL) { - asprintf(&np, "%s%.*s%s", p, m - str, str, strerror(errno)); + asprintf(&np, "%s%.*s%s", p, (int)(m - str), + str, strerror(errno)); free(p); if (np == NULL) { errno = ENOMEM;