- GError will be set if GDBusConnection is null,
according to reference guide docs.
- 'or' should be change into 'and' to resolve static analysis
problem.
Change-Id: I82ece65c0b8eb74a69ca2cd540cc72860c11720d
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
GVariant* parameter) {
GError* err = nullptr;
GDBusConnection* con = g_bus_get_sync(G_BUS_TYPE_SYSTEM, nullptr, &err);
- if (!con || err) {
+ if (!con && err) {
LOG(WARNING) << "Failed to get dbus connection: " << err->message;
g_error_free(err);
return false;