prevent overflow
authorceriel <none@none>
Fri, 5 Apr 1991 09:24:45 +0000 (09:24 +0000)
committerceriel <none@none>
Fri, 5 Apr 1991 09:24:45 +0000 (09:24 +0000)
lang/cem/libcc.ansi/time/misc.c

index 542323e..59f255e 100644 (file)
@@ -491,7 +491,7 @@ _dstget(register struct tm *timep)
                if (timep->tm_yday == begindst)
                        dsttranssec = dsts->ds_sec;
                else    dsttranssec = dste->ds_sec;
-               cursec = ((timep->tm_hour * 60) + timep->tm_min) * 60
+               cursec = ((timep->tm_hour * 60) + timep->tm_min) * 60L
                            + timep->tm_sec;
 
                if ((timep->tm_yday == begindst && cursec >= dsttranssec)