qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] migration: Remove time_t cast for OpenBSD
@ 2021-02-22  7:28 Brad Smith
  2021-03-08 11:46 ` Thomas Huth
  0 siblings, 1 reply; 10+ messages in thread
From: Brad Smith @ 2021-02-22  7:28 UTC (permalink / raw)
  To: qemu-devel

OpenBSD has supported 64-bit time_t across all archs since 5.5 released in 2014.

Remove a time_t cast that is no longer necessary.


Signed-off-by: Brad Smith <brad@comstyle.com>

diff --git a/migration/savevm.c b/migration/savevm.c
index 52e2d72e4b..9557f85ba9 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2849,8 +2849,7 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate,
     if (name) {
         pstrcpy(sn->name, sizeof(sn->name), name);
     } else {
-        /* cast below needed for OpenBSD where tv_sec is still 'long' */
-        localtime_r((const time_t *)&tv.tv_sec, &tm);
+        localtime_r(&tv.tv_sec, &tm);
         strftime(sn->name, sizeof(sn->name), "vm-%Y%m%d%H%M%S", &tm);
     }
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-04-01 17:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22  7:28 [PATCH] migration: Remove time_t cast for OpenBSD Brad Smith
2021-03-08 11:46 ` Thomas Huth
2021-03-09 21:08   ` Laurent Vivier
2021-03-11 18:28     ` Dr. David Alan Gilbert
2021-03-11 18:39       ` Daniel P. Berrangé
2021-03-13 23:33         ` Brad Smith
2021-03-31 19:26           ` Brad Smith
2021-04-01  8:14             ` Daniel P. Berrangé
2021-04-01 17:14               ` Brad Smith
2021-03-09 21:38   ` Brad Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).