From: Jim Meyering Date: Sat, 16 Mar 1996 05:43:24 +0000 (+0000) Subject: (validate_path): Cast path_max to size_t before X-Git-Tag: SH-UTILS-1_12e~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=182c784a997ee62470118058e441a5edc00142f3;p=thirdparty%2Fcoreutils.git (validate_path): Cast path_max to size_t before comparing with strlen(path). --- diff --git a/src/pathchk.c b/src/pathchk.c index ad5daddf69..ddb44ef240 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -342,7 +342,7 @@ validate_path (char *path, int portability) if (path_max < 0) path_max = _POSIX_PATH_MAX; free (parent); - if (strlen (path) > path_max) + if (strlen (path) > (size_t) path_max) { error (0, 0, _("path `%s' has length %d; exceeds limit of %d"), path, strlen (path), path_max);