summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2009-01-15 17:36:27 +0000
committerPádraig Brady <P@draigBrady.com>2009-01-16 11:06:09 +0000
commita7592cfcb2d9e70b938002b6d890ace750af55be (patch)
tree907253665f4639aa98e02b93a16f56788e601947 /src
parent3288ebb0d70cd8140f947a7aa3a83ab0e904f624 (diff)
downloadcoreutils-a7592cfcb2d9e70b938002b6d890ace750af55be.tar.xz
pathchk: avoid -Wsign-compare warnings
* src/pathchk.c: Compare pathconf limits to _signed_ MAX constants, as pathconf returns signed values.
Diffstat (limited to 'src')
-rw-r--r--src/pathchk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pathchk.c b/src/pathchk.c
index 5dbc7da68..526134507 100644
--- a/src/pathchk.c
+++ b/src/pathchk.c
@@ -1,5 +1,5 @@
/* pathchk -- check whether file names are valid or portable
- Copyright (C) 1991-2008 Free Software Foundation, Inc.
+ Copyright (C) 1991-2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -323,7 +323,7 @@ validate_file_name (char *file, bool check_basic_portability,
dir);
return false;
}
- maxsize = MIN (size, SIZE_MAX);
+ maxsize = MIN (size, SSIZE_MAX);
}
if (maxsize <= filelen)
@@ -385,7 +385,7 @@ validate_file_name (char *file, bool check_basic_portability,
len = pathconf (dir, _PC_NAME_MAX);
*start = c;
if (0 <= len)
- name_max = MIN (len, SIZE_MAX);
+ name_max = MIN (len, SSIZE_MAX);
else
switch (errno)
{