From patchwork Fri Oct 28 15:18:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 79978 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp1258512qge; Fri, 28 Oct 2016 09:16:41 -0700 (PDT) X-Received: by 10.129.108.134 with SMTP id h128mr12637222ywc.346.1477671401367; Fri, 28 Oct 2016 09:16:41 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id g3si6582068uab.58.2016.10.28.09.16.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 28 Oct 2016 09:16:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:50156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c09pg-0004fU-1r for patch@linaro.org; Fri, 28 Oct 2016 12:16:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c09VU-0002yQ-0a for qemu-devel@nongnu.org; Fri, 28 Oct 2016 11:55:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c09VQ-0003IW-VS for qemu-devel@nongnu.org; Fri, 28 Oct 2016 11:55:48 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:51536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c09VQ-0003Gt-NP; Fri, 28 Oct 2016 11:55:44 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id A6E5C43749; Fri, 28 Oct 2016 18:55:43 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id C223EB68; Fri, 28 Oct 2016 18:18:58 +0300 (MSK) Received: (nullmailer pid 6077 invoked by uid 1000); Fri, 28 Oct 2016 15:18:56 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Fri, 28 Oct 2016 18:18:47 +0300 Message-Id: <25174055f428254427e7541139037eb9a34fc109.1477667878.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 16/23] migration: Remove unneeded NULL check from migrate_fd_error() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell All the callers of migrate_fd_error() pass a non-NULL error parameter, and if any did pass NULL then we would segfault in error_copy(), so remove the unnecessary NULL check earlier in the function. (Spotted by Coverity.) Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.1.4 diff --git a/migration/migration.c b/migration/migration.c index 4d417b7..d216b93 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -922,7 +922,7 @@ static void migrate_fd_cleanup(void *opaque) void migrate_fd_error(MigrationState *s, const Error *error) { - trace_migrate_fd_error(error ? error_get_pretty(error) : ""); + trace_migrate_fd_error(error_get_pretty(error)); assert(s->to_dst_file == NULL); migrate_set_state(&s->state, MIGRATION_STATUS_SETUP, MIGRATION_STATUS_FAILED);