diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-01-15 17:36:27 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2009-01-16 11:06:09 +0000 |
commit | a7592cfcb2d9e70b938002b6d890ace750af55be (patch) | |
tree | 907253665f4639aa98e02b93a16f56788e601947 /src | |
parent | 3288ebb0d70cd8140f947a7aa3a83ab0e904f624 (diff) | |
download | coreutils-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.c | 6 |
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) { |