From patchwork Fri Apr 17 14:22:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 462056 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 586FA1401AB for ; Sat, 18 Apr 2015 00:24:04 +1000 (AEST) Received: from localhost ([::1]:41621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7BZ-0005GI-Hw for incoming@patchwork.ozlabs.org; Fri, 17 Apr 2015 10:24:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7BE-0004gL-UL for qemu-devel@nongnu.org; Fri, 17 Apr 2015 10:23:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yj7BD-0002qM-0Y for qemu-devel@nongnu.org; Fri, 17 Apr 2015 10:23:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7BC-0002qG-PF for qemu-devel@nongnu.org; Fri, 17 Apr 2015 10:23:38 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3HENbef027073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 17 Apr 2015 10:23:38 -0400 Received: from localhost.localdomain.com (vpn1-5-19.ams2.redhat.com [10.36.5.19]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3HENPZA011852; Fri, 17 Apr 2015 10:23:34 -0400 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Fri, 17 Apr 2015 15:22:04 +0100 Message-Id: <1429280557-8887-2-git-send-email-berrange@redhat.com> In-Reply-To: <1429280557-8887-1-git-send-email-berrange@redhat.com> References: <1429280557-8887-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Paolo Bonzini , Gerd Hoffmann , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH v1 RFC 01/34] ui: remove check for failure of qemu_acl_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The qemu_acl_init() function has long since stopped being able to return NULL, since g_malloc will abort on OOM. As such the checks for NULL were unreachable code. Signed-off-by: Daniel P. Berrange Reviewed-by: Eric Blake --- ui/vnc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index cffb5b7..6bfe228 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3602,10 +3602,6 @@ void vnc_display_open(const char *id, Error **errp) aclname = g_strdup_printf("vnc.%s.x509dname", vs->id); } vs->tls.acl = qemu_acl_init(aclname); - if (!vs->tls.acl) { - fprintf(stderr, "Failed to create x509 dname ACL\n"); - exit(1); - } g_free(aclname); } #endif @@ -3619,10 +3615,6 @@ void vnc_display_open(const char *id, Error **errp) aclname = g_strdup_printf("vnc.%s.username", vs->id); } vs->sasl.acl = qemu_acl_init(aclname); - if (!vs->sasl.acl) { - fprintf(stderr, "Failed to create username ACL\n"); - exit(1); - } g_free(aclname); } #endif