File procinfo-uptime.dif of Package procinfo

--- routines.c
+++ routines.c	2001-09-17 15:12:46.000000000 +0000
@@ -390,19 +390,19 @@ hms (unsigned long t)
     unsigned int d, h, m, s;
     static char buf[22];
 
-    t = t * 100 / HZ;
-    d = (int) (t / 8640000);
-    t = t - (long) (d * 8640000);
-    h = (int) (t / 360000);
-    t = t - (long) (h * 360000);
-    m = (int) (t / 6000);
-    t = t - (long) (m * 6000);
-    s = (int) (t / 100);
-    t = t - (long) (s * 100);
+    t *= 100 / HZ;
+    d = (unsigned int) (t / 8640000);
+    t = t - ((unsigned long)d * 8640000);
+    h = (unsigned int) (t / 360000);
+    t = t - ((unsigned long)h * 360000);
+    m = (unsigned int) (t / 6000);
+    t = t - ((unsigned long)m * 6000);
+    s = (unsigned int) (t / 100);
+    t = t - ((unsigned long)s * 100);
     if (d > 0)
-	sprintf (buf, "%3ud %2u:%02u:%02u.%02u", d, h, m, s, (int) t);
+	sprintf (buf, "%3ud %2u:%02u:%02u.%02u", d, h, m, s, (unsigned int) t);
     else
-	sprintf (buf, "     %2u:%02u:%02u.%02u", h, m, s, (int) t);
+	sprintf (buf, "     %2u:%02u:%02u.%02u", h, m, s, (unsigned int) t);
     return buf;
 }
 
openSUSE Build Service is sponsored by