From: Emmanuel Blot Date: Fri, 7 Nov 2014 17:24:13 +0000 (+0100) Subject: Fix bad cast from `u16_t` to `ssize_t` X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=f92baba71cf30fff693a36e8cc9dd267707f9579;p=minix.git Fix bad cast from `u16_t` to `ssize_t` --- diff --git a/minix/fs/procfs/util.c b/minix/fs/procfs/util.c index eeaae9a95..6b9be5dfa 100644 --- a/minix/fs/procfs/util.c +++ b/minix/fs/procfs/util.c @@ -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