]> Zhao Yanbai Git Server - minix.git/commitdiff
Fix bad cast from `u16_t` to `ssize_t` 89/2889/1
authorEmmanuel Blot <emmanuel.blot@free.fr>
Fri, 7 Nov 2014 17:24:13 +0000 (18:24 +0100)
committerDavid van Moolenbroek <david@minix3.org>
Wed, 12 Nov 2014 12:13:28 +0000 (12:13 +0000)
minix/fs/procfs/util.c

index eeaae9a9514076426e6b75dfc25c5748638000ee..6b9be5dfa1400d3d9f3157c4121506eaebb0557b 100644 (file)
@@ -50,7 +50,7 @@ int procfs_getloadavg(struct load *loadavg, int nelem)
                        slot = (latest - h + _LOAD_HISTORY) % _LOAD_HISTORY;
                        loadavg[p].proc_load +=
                                 loadinfo.proc_load_history[slot];
-                       l += (double) loadinfo.proc_load_history[slot];
+                       l += (ssize_t) loadinfo.proc_load_history[slot];
                }
 
                /* The load average over this number of minutes is the number