summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanu.kaskinen@digia.com>2012-03-28 12:27:26 +0300
committerTanu Kaskinen <tanuk@iki.fi>2012-03-28 17:34:01 +0300
commit87479307477496d1e3f6720ed9c15d1c890e9b73 (patch)
treec03c77fd09284ab55ff281084c316f7096a51298
parent9d640e4491772e9edacc802ac72ed49d1f86176f (diff)
device-manager: Add an assertion to get rid of a warning from Coverity.
Coverity thinks that device_name can be NULL when it's dereferenced by strcmp. Adding an assertion doesn't hurt here (in my opinion), and that should get rid of the warning.
-rw-r--r--src/modules/module-device-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/module-device-manager.c b/src/modules/module-device-manager.c
index 2ce4c789..e11921da 100644
--- a/src/modules/module-device-manager.c
+++ b/src/modules/module-device-manager.c
@@ -576,7 +576,7 @@ static void update_highest_priority_device_indexes(struct userdata *u, const cha
struct entry *e;
name = pa_xstrndup(key.data, key.size);
- device_name = get_name(name, prefix);
+ pa_assert_se(device_name = get_name(name, prefix));
if ((e = entry_read(u, name))) {
for (uint32_t i = 0; i < NUM_ROLES; ++i) {