From 25361327515e196fb1764cb3fd89a9a5249ec0c4 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 27 Jan 2006 03:38:48 +0000 Subject: [PATCH] Return value error check for times() requires an explicit cast --- src/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/time.c b/src/time.c index 8b5a09b..53a9cbc 100644 --- a/src/time.c +++ b/src/time.c @@ -21,7 +21,7 @@ static int _time(char * argv[]) struct tms tmsbuf; clock_t cbefore, cafter; - if((cbefore = times(NULL)) == -1) + if((cbefore = times(NULL)) == (clock_t)-1) return _time_error("times", 2); if((pid = fork()) == -1) return _time_error("fork", 2); @@ -34,7 +34,7 @@ static int _time(char * argv[]) if(WIFEXITED(status)) break; } - if((cafter = times(&tmsbuf)) == -1) + if((cafter = times(&tmsbuf)) == (clock_t)-1) return _time_error("times", 2); return _time_print(cafter - cbefore, tmsbuf.tms_utime + tmsbuf.tms_cutime,