summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pulsecore/object.c2
-rw-r--r--src/pulsecore/object.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/pulsecore/object.c b/src/pulsecore/object.c
index 23a45754..6680d078 100644
--- a/src/pulsecore/object.c
+++ b/src/pulsecore/object.c
@@ -68,5 +68,5 @@ void pa_object_unref(pa_object *o) {
int pa_object_check_type(const char *type_name) {
pa_assert(type_name);
- return type_name == "pa_object" || strcmp(type_name, "pa_object") == 0;
+ return strcmp(type_name, "pa_object") == 0;
}
diff --git a/src/pulsecore/object.h b/src/pulsecore/object.h
index 9c62f74a..562fd113 100644
--- a/src/pulsecore/object.h
+++ b/src/pulsecore/object.h
@@ -96,8 +96,7 @@ static inline pa_object* pa_object_cast(void *o) {
#define PA_DEFINE_CHECK_TYPE(c, parent) \
int c##_check_type(const char *type) { \
pa_assert(type); \
- if (type == #c || \
- strcmp(type, #c) == 0) \
+ if (strcmp(type, #c) == 0) \
return 1; \
return parent##_check_type(type); \
} \