33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
|
From 855359a615a6002ac601a778f12e60970f18c64f Mon Sep 17 00:00:00 2001
|
||
|
From: Kay Sievers <kay@vrfy.org>
|
||
|
Date: Sat, 2 Nov 2013 00:01:32 +0100
|
||
|
Subject: [PATCH] detect_virtualization() returns NULL; pass empty string to
|
||
|
dbus
|
||
|
|
||
|
---
|
||
|
src/core/dbus-manager.c | 4 +++-
|
||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
|
||
|
index 8f4d017..536f2ea 100644
|
||
|
--- a/src/core/dbus-manager.c
|
||
|
+++ b/src/core/dbus-manager.c
|
||
|
@@ -466,7 +466,7 @@ static int bus_manager_append_progress(DBusMessageIter *i, const char *property,
|
||
|
|
||
|
static int bus_manager_append_virt(DBusMessageIter *i, const char *property, void *data) {
|
||
|
Manager *m = data;
|
||
|
- const char *id = "";
|
||
|
+ const char *id = NULL;
|
||
|
|
||
|
assert(i);
|
||
|
assert(property);
|
||
|
@@ -474,6 +474,8 @@ static int bus_manager_append_virt(DBusMessageIter *i, const char *property, voi
|
||
|
|
||
|
detect_virtualization(&id);
|
||
|
|
||
|
+ if (!id)
|
||
|
+ id = "";
|
||
|
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &id))
|
||
|
return -ENOMEM;
|
||
|
|