* [Qemu-devel] [PATCH] ui: remove check for failure of qemu_acl_init()
@ 2015-05-01 10:44 Daniel P. Berrange
2015-05-01 12:21 ` Eric Blake
2015-05-05 9:47 ` Gerd Hoffmann
0 siblings, 2 replies; 3+ messages in thread
From: Daniel P. Berrange @ 2015-05-01 10:44 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gerd Hoffmann
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 <berrange@redhat.com>
---
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
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] ui: remove check for failure of qemu_acl_init()
2015-05-01 10:44 [Qemu-devel] [PATCH] ui: remove check for failure of qemu_acl_init() Daniel P. Berrange
@ 2015-05-01 12:21 ` Eric Blake
2015-05-05 9:47 ` Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2015-05-01 12:21 UTC (permalink / raw)
To: Daniel P. Berrange, qemu-devel; +Cc: qemu-trivial, Gerd Hoffmann
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
On 05/01/2015 04:44 AM, Daniel P. Berrange wrote:
> 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 <berrange@redhat.com>
> ---
> ui/vnc.c | 8 --------
> 1 file changed, 8 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] ui: remove check for failure of qemu_acl_init()
2015-05-01 10:44 [Qemu-devel] [PATCH] ui: remove check for failure of qemu_acl_init() Daniel P. Berrange
2015-05-01 12:21 ` Eric Blake
@ 2015-05-05 9:47 ` Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2015-05-05 9:47 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: qemu-trivial, qemu-devel
On Fr, 2015-05-01 at 11:44 +0100, Daniel P. Berrange wrote:
> 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.
added to vnc queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-05 9:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-01 10:44 [Qemu-devel] [PATCH] ui: remove check for failure of qemu_acl_init() Daniel P. Berrange
2015-05-01 12:21 ` Eric Blake
2015-05-05 9:47 ` Gerd Hoffmann
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).