From bc6b9b68d5f38a2f90f272ea6a2abd6add012a7d Mon Sep 17 00:00:00 2001 From: markm Date: Sat, 3 May 2003 20:52:48 +0000 Subject: Fix long constant usage for i386. Tested by: Joe Marcus Clarke --- bin/ps/fmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/ps') diff --git a/bin/ps/fmt.c b/bin/ps/fmt.c index aae79e0..1d907af 100644 --- a/bin/ps/fmt.c +++ b/bin/ps/fmt.c @@ -70,7 +70,7 @@ shquote(char **argv) if (buf == NULL) { if ((arg_max = sysconf(_SC_ARG_MAX)) == -1) errx(1, "sysconf _SC_ARG_MAX failed"); - if (arg_max >= LONG_MAX / 4 || 4 * arg_max + 1 > (long)SIZE_MAX) + if (arg_max >= LONG_MAX / 4 || arg_max >= (long)(SIZE_MAX / 4)) errx(1, "sysconf _SC_ARG_MAX preposterously large"); buf_size = 4 * arg_max + 1; if ((buf = malloc(buf_size)) == NULL) -- cgit v1.1