process.c: remove useless cast

* process.c (get_clk_tck): remove useless cast, implicitly cast to
  long again.

* process.c (rb_proc_times): cast explicitly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-01-17 11:16:24 +00:00
Родитель 1d281ba6de
Коммит 9a952626f1
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -6884,7 +6884,7 @@ get_clk_tck(void)
{
long hertz =
#ifdef HAVE__SC_CLK_TCK
(double)sysconf(_SC_CLK_TCK);
sysconf(_SC_CLK_TCK);
#else
#ifndef HZ
# ifdef CLK_TCK
@ -6924,7 +6924,7 @@ rb_proc_times(VALUE obj)
cutime = DBL2NUM((double)usage_c.ru_utime.tv_sec + (double)usage_c.ru_utime.tv_usec/1e6);
cstime = DBL2NUM((double)usage_c.ru_stime.tv_sec + (double)usage_c.ru_stime.tv_usec/1e6);
#else
const double hertz = get_clk_tck();
const double hertz = (double)get_clk_tck();
struct tms buf;
times(&buf);