From 8c2df19687b187984be9a4b27caba6d4bcf1b96b Mon Sep 17 00:00:00 2001 From: kan Date: Fri, 11 Jul 2003 05:47:05 +0000 Subject: Do not compare unsigned int values with ULONG_MAX. The comparison is always false on 64bit platforms and GCC 3.3.1 issues warning there. --- sbin/mdconfig/mdconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sbin/mdconfig/mdconfig.c') diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c index 263a942..6296da7 100644 --- a/sbin/mdconfig/mdconfig.c +++ b/sbin/mdconfig/mdconfig.c @@ -164,7 +164,7 @@ main(int argc, char **argv) if (!strncmp(optarg, MD_NAME, sizeof(MD_NAME) - 1)) optarg += sizeof(MD_NAME) - 1; mdio.md_unit = strtoul(optarg, &p, 0); - if ((unsigned)mdio.md_unit == ULONG_MAX || *p != '\0') + if (mdio.md_unit == (unsigned)ULONG_MAX || *p != '\0') errx(1, "bad unit: %s", optarg); mdio.md_options &= ~MD_AUTOUNIT; break; -- cgit v1.1