Commit 4562999c authored by Christian Kellner's avatar Christian Kellner

manager: assert bolt_auth_new returns a new object

bolt_auth_new is a wrapper around g_object, which should always
return a new object. The static analysis tool of clang keep
complaining about it. An added assertion should keep it happy.
parent 4109e9a9
...@@ -1379,6 +1379,11 @@ manager_enroll_device_prepare (BoltManager *mgr, ...@@ -1379,6 +1379,11 @@ manager_enroll_device_prepare (BoltManager *mgr,
auth = bolt_auth_new (mgr, level, key); auth = bolt_auth_new (mgr, level, key);
/* bolt_auth_new is a wrapper around g_object_new and
* therefore cannot realistically fail. This assertion
* convinces clang's static analysis of that fact. */
g_assert (auth != NULL);
return auth; return auth;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment