From a7592cfcb2d9e70b938002b6d890ace750af55be Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Thu, 15 Jan 2009 17:36:27 +0000 Subject: [PATCH] pathchk: avoid -Wsign-compare warnings * src/pathchk.c: Compare pathconf limits to _signed_ MAX constants, as pathconf returns signed values. --- src/pathchk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pathchk.c b/src/pathchk.c index 5dbc7da683..526134507b 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) { -- 2.47.3