diff options
author | Deng Zhengrong <dzrongg@gmail.com> | 2012-05-25 10:17:51 +0800 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2012-05-29 08:47:40 +0530 |
commit | 9be176f40312a38882e1db46645b136e69b2cad4 (patch) | |
tree | 52cf6c9a8a5e269a0c0f623c7ef86b9f1e16cd09 | |
parent | 9d40957c79c7690886728296faf25de9f7cb6da5 (diff) |
daemon: use pa_streq instead of plain strcmp
Just noticed that in daemon-conf.c, it uses plain strcmp(),
while in PulseAudio, it should be better to use pa_streq().
-rw-r--r-- | src/daemon/daemon-conf.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c index 3ef7f812a..dd2e7b635 100644 --- a/src/daemon/daemon-conf.c +++ b/src/daemon/daemon-conf.c | |||
@@ -180,12 +180,12 @@ int pa_daemon_conf_set_log_target(pa_daemon_conf *c, const char *string) { | |||
180 | pa_assert(c); | 180 | pa_assert(c); |
181 | pa_assert(string); | 181 | pa_assert(string); |
182 | 182 | ||
183 | if (!strcmp(string, "auto")) | 183 | if (pa_streq(string, "auto")) |
184 | c->auto_log_target = 1; | 184 | c->auto_log_target = 1; |
185 | else if (!strcmp(string, "syslog")) { | 185 | else if (pa_streq(string, "syslog")) { |
186 | c->auto_log_target = 0; | 186 | c->auto_log_target = 0; |
187 | c->log_target = PA_LOG_SYSLOG; | 187 | c->log_target = PA_LOG_SYSLOG; |
188 | } else if (!strcmp(string, "stderr")) { | 188 | } else if (pa_streq(string, "stderr")) { |
189 | c->auto_log_target = 0; | 189 | c->auto_log_target = 0; |
190 | c->log_target = PA_LOG_STDERR; | 190 | c->log_target = PA_LOG_STDERR; |
191 | } else if (pa_startswith(string, "file:")) { | 191 | } else if (pa_startswith(string, "file:")) { |
@@ -251,11 +251,11 @@ int pa_daemon_conf_set_local_server_type(pa_daemon_conf *c, const char *string) | |||
251 | pa_assert(c); | 251 | pa_assert(c); |
252 | pa_assert(string); | 252 | pa_assert(string); |
253 | 253 | ||
254 | if (!strcmp(string, "user")) | 254 | if (pa_streq(string, "user")) |
255 | c->local_server_type = PA_SERVER_TYPE_USER; | 255 | c->local_server_type = PA_SERVER_TYPE_USER; |
256 | else if (!strcmp(string, "system")) { | 256 | else if (pa_streq(string, "system")) { |
257 | c->local_server_type = PA_SERVER_TYPE_SYSTEM; | 257 | c->local_server_type = PA_SERVER_TYPE_SYSTEM; |
258 | } else if (!strcmp(string, "none")) { | 258 | } else if (pa_streq(string, "none")) { |
259 | c->local_server_type = PA_SERVER_TYPE_NONE; | 259 | c->local_server_type = PA_SERVER_TYPE_NONE; |
260 | } else | 260 | } else |
261 | return -1; | 261 | return -1; |