From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 8e2b2a2: Minor cleanup in pdumper.c Date: Sun, 20 Jan 2019 05:44:27 +0200 Message-ID: <838szgat7o.fsf@gnu.org> References: <20190119182259.26893.32117@vcs0.savannah.gnu.org> <20190119182301.0DE562043D@vcs0.savannah.gnu.org> <034912a4e687ae39bfc17b45ec6a9ef7.squirrel@dancol.org> <4508562eb2e3fe5fedd01263f6c39d5c.squirrel@dancol.org> <176c3ec3-7c6a-8f89-b31c-66c8cd129339@cs.ucla.edu> <65893773f79082a62d6654c818979479.squirrel@dancol.org> NNTP-Posting-Host: ciao.gmane.org X-Trace: ciao.gmane.org 1547955891 16168 195.159.176.228 (20 Jan 2019 03:44:51 GMT) X-Complaints-To: usenet@ciao.gmane.org NNTP-Posting-Date: Sun, 20 Jan 2019 03:44:51 +0000 (UTC) Cc: dancol@dancol.org, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 20 04:44:49 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1gl42R-0004Bj-9o for ged-emacs-devel@m.gmane.org; Sun, 20 Jan 2019 04:44:47 +0100 Original-Received: from localhost ([127.0.0.1]:34857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gl42a-00036J-Cr for ged-emacs-devel@m.gmane.org; Sat, 19 Jan 2019 22:44:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gl42R-00034x-0I for emacs-devel@gnu.org; Sat, 19 Jan 2019 22:44:47 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gl42Q-00087a-FO; Sat, 19 Jan 2019 22:44:46 -0500 Original-Received: from [176.228.60.248] (port=1279 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gl42O-0007Jf-N9; Sat, 19 Jan 2019 22:44:46 -0500 In-reply-to: (message from Paul Eggert on Sat, 19 Jan 2019 14:41:04 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232524 Archived-At: > From: Paul Eggert > Date: Sat, 19 Jan 2019 14:41:04 -0800 > Cc: emacs-devel@gnu.org > > diff --git a/src/pdumper.c b/src/pdumper.c > index 19a21329b1..4bbeabb828 100644 > --- a/src/pdumper.c > +++ b/src/pdumper.c > @@ -5545,9 +5545,10 @@ pdumper_load (const char *dump_filename) > > struct timespec load_timespec = > timespec_sub (current_timespec (), start_time); > - dump_private.load_time = > - (double) load_timespec.tv_sec * 1000.0 > - + (double) load_timespec.tv_nsec * 0.000001; > + ALLOW_IMPLICIT_CONVERSION; > + double s = load_timespec.tv_sec, ns = load_timespec.tv_nsec; > + DISALLOW_IMPLICIT_CONVERSION; > + dump_private.load_time = (s * 1e9 + ns) / 1e9; Any reason not to use timespectod?