summaryrefslogtreecommitdiff
path: root/spa/lib/debug.c
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2017-03-23 21:15:52 +0100
committerWim Taymans <wtaymans@redhat.com>2017-03-23 21:15:52 +0100
commitacedfe71c0010934d5a0e53addfb9d7f6f4a77b5 (patch)
tree78face6023968ea967bc0778866df0dab2a372ee /spa/lib/debug.c
parentd9a51b5d149dbcdcc4097bb0c23849650c7fad80 (diff)
clean up types
Diffstat (limited to 'spa/lib/debug.c')
-rw-r--r--spa/lib/debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/spa/lib/debug.c b/spa/lib/debug.c
index 2c660ba7..c1447fad 100644
--- a/spa/lib/debug.c
+++ b/spa/lib/debug.c
@@ -338,7 +338,7 @@ print_format_value (uint32_t size, uint32_t type, void *body)
{
const char *str = spa_id_map_get_uri (spa_id_map_get_default(), *(int32_t*)body);
if (str) {
- const char *h = strstr (str, "#");
+ const char *h = rindex (str, ':');
if (h)
str = h + 1;
} else {
@@ -403,7 +403,7 @@ spa_debug_format (const SpaFormat *format)
media_type = spa_id_map_get_uri (spa_id_map_get_default (), mtype);
media_subtype = spa_id_map_get_uri (spa_id_map_get_default (), mstype);
- fprintf (stderr, "%-6s %s/%s\n", "", strstr (media_type, "#")+1, strstr (media_subtype, "#")+1);
+ fprintf (stderr, "%-6s %s/%s\n", "", rindex (media_type, ':')+1, rindex (media_subtype, ':')+1);
SPA_FORMAT_FOREACH (format, prop) {
const char *key;
@@ -414,7 +414,7 @@ spa_debug_format (const SpaFormat *format)
key = spa_id_map_get_uri (spa_id_map_get_default (), prop->body.key);
- fprintf (stderr, " %20s : (%s) ", strstr (key, "#")+1, pod_type_names[prop->body.value.type].name);
+ fprintf (stderr, " %20s : (%s) ", rindex (key, ':')+1, pod_type_names[prop->body.value.type].name);
if (!(prop->body.flags & SPA_POD_PROP_FLAG_UNSET)) {
print_format_value (prop->body.value.size, prop->body.value.type, SPA_POD_BODY (&prop->body.value));