From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuzSI-0000PI-8y for qemu-devel@nongnu.org; Wed, 20 May 2015 04:34:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuzSF-0007Bf-3j for qemu-devel@nongnu.org; Wed, 20 May 2015 04:34:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuzSE-0007BL-UQ for qemu-devel@nongnu.org; Wed, 20 May 2015 04:34:19 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 1C390C6599 for ; Wed, 20 May 2015 08:34:18 +0000 (UTC) From: Gerd Hoffmann Date: Wed, 20 May 2015 10:34:10 +0200 Message-Id: <1432110853-11399-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1432110853-11399-1-git-send-email-kraxel@redhat.com> References: <1432110853-11399-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 2/5] ui: remove check for failure of qemu_acl_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann From: "Daniel P. Berrange" 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 Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 2dccae9..076355d 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3609,10 +3609,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 @@ -3626,10 +3622,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 -- 1.8.3.1