From patchwork Mon Feb 22 07:28:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Smith X-Patchwork-Id: 12098013 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CDCFC433E0 for ; Mon, 22 Feb 2021 07:29:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C679864EC3 for ; Mon, 22 Feb 2021 07:29:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C679864EC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=comstyle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lE5f5-0007Jt-H3 for qemu-devel@archiver.kernel.org; Mon, 22 Feb 2021 02:29:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lE5dl-0006qB-2P for qemu-devel@nongnu.org; Mon, 22 Feb 2021 02:28:21 -0500 Received: from speedy.comstyle.com ([2607:f938:3000:8::2]:9126 helo=mail.comstyle.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lE5di-0004VA-Fd for qemu-devel@nongnu.org; Mon, 22 Feb 2021 02:28:20 -0500 Received: from mail.comstyle.com (localhost [127.0.0.1]) by mail.comstyle.com (Postfix) with ESMTP id 4DkYjh1rZtz8PbN for ; Mon, 22 Feb 2021 02:30:00 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=comstyle.com; h=date:from :to:subject:message-id:mime-version:content-type; s=default; bh= G/WzEknvjJH14+e3t0izjdKLLK4=; b=jeSbRvjeMExjg8mlSk8F0cbqSww+c6YG 8rnpi9CbTJAb3OAWmBNkow/veIANS9e37nu84ZANtn9A6l4uJpKVsDWtuhJHa4VZ GSxgxZ1e38pkWqiO/ojT8Po/lVQppc4kv5BoA+tSgCKb5EGXOfmL1ZnEkKGniNRM fxr5kHNiY+Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=comstyle.com; h=date:from:to :subject:message-id:mime-version:content-type; q=dns; s=default; b= TG50spB00PJShaHnIq+sFg9fyvKtGde2DRqY8fnD5GiE/gfXl2yEa9xba2pCliPH ioZ9jZ227VTPbye1/mT+9a7ysz5c9mVHMawTq7Hx3ZJDGGW1RnDbRMhrkC7zyx88 SzWK/e9NOzPRE4gncuBIM57yebv7dw9ANBGXmxSO81I= Received: from humpty.home.comstyle.com (bras-base-toroon2719w-grc-43-174-88-243-61.dsl.bell.ca [174.88.243.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: brad) by mail.comstyle.com (Postfix) with ESMTPSA id 4DkYjh1B1yz8PbK for ; Mon, 22 Feb 2021 02:30:00 -0500 (EST) Date: Mon, 22 Feb 2021 02:28:02 -0500 From: Brad Smith To: qemu-devel@nongnu.org Subject: [PATCH] migration: Remove time_t cast for OpenBSD Message-ID: MIME-Version: 1.0 Content-Disposition: inline Received-SPF: pass client-ip=2607:f938:3000:8::2; envelope-from=brad@comstyle.com; helo=mail.comstyle.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "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 Reviewed-by: Thomas Huth 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); }