diff options
author | Arti Trivedi Bora <tbaarti@gmail.com> | 2012-06-06 01:28:14 +0530 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2012-06-09 16:22:13 +0300 |
commit | 96a52257a90f03478976fe762f544145cf1d681a (patch) | |
tree | a01615e75e52a1a493cf225f0077e6954eeb8426 /src/pulsecore/core-util.c | |
parent | e5954aca8eadfb628c5689812f22e0d6aed41908 (diff) | |
download | pulseaudio-96a52257a90f03478976fe762f544145cf1d681a.tar.gz |
pulsecore: Use pa_streq instead of strcmp.
Diffstat (limited to 'src/pulsecore/core-util.c')
-rw-r--r-- | src/pulsecore/core-util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 82480c66c..d79d289f1 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -168,7 +168,7 @@ char *pa_win32_get_toplevel(HANDLE handle) { *p = '\0'; p = strrchr(toplevel, PA_PATH_SEP_CHAR); - if (p && (strcmp(p + 1, "bin") == 0)) + if (p && pa_streq(p + 1, "bin")) *p = '\0'; } @@ -892,9 +892,9 @@ int pa_parse_boolean(const char *v) { pa_assert(v); /* First we check language independent */ - if (!strcmp(v, "1") || v[0] == 'y' || v[0] == 'Y' || v[0] == 't' || v[0] == 'T' || !strcasecmp(v, "on")) + if (pa_streq(v, "1") || v[0] == 'y' || v[0] == 'Y' || v[0] == 't' || v[0] == 'T' || !strcasecmp(v, "on")) return 1; - else if (!strcmp(v, "0") || v[0] == 'n' || v[0] == 'N' || v[0] == 'f' || v[0] == 'F' || !strcasecmp(v, "off")) + else if (pa_streq(v, "0") || v[0] == 'n' || v[0] == 'N' || v[0] == 'f' || v[0] == 'F' || !strcasecmp(v, "off")) return 0; #ifdef HAVE_LANGINFO_H @@ -1100,7 +1100,7 @@ static int is_group(gid_t gid, const char *name) { goto finish; } - r = strcmp(name, group->gr_name) == 0; + r = pa_streq(name, group->gr_name); finish: pa_getgrgid_free(group); @@ -1998,7 +1998,7 @@ pa_bool_t pa_endswith(const char *s, const char *sfx) { l1 = strlen(s); l2 = strlen(sfx); - return l1 >= l2 && strcmp(s+l1-l2, sfx) == 0; + return l1 >= l2 && pa_streq(s + l1 - l2, sfx); } pa_bool_t pa_is_path_absolute(const char *fn) { |