mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
modules: Use pa_streq instead of strcmp.
This commit is contained in:
parent
e0c16af551
commit
e5954aca8e
19 changed files with 45 additions and 45 deletions
|
|
@ -398,13 +398,13 @@ const char* pa_rtp_format_to_string(pa_sample_format_t f) {
|
|||
pa_sample_format_t pa_rtp_string_to_format(const char *s) {
|
||||
pa_assert(s);
|
||||
|
||||
if (!(strcmp(s, "L16")))
|
||||
if (pa_streq(s, "L16"))
|
||||
return PA_SAMPLE_S16BE;
|
||||
else if (!strcmp(s, "L8"))
|
||||
else if (pa_streq(s, "L8"))
|
||||
return PA_SAMPLE_U8;
|
||||
else if (!strcmp(s, "PCMA"))
|
||||
else if (pa_streq(s, "PCMA"))
|
||||
return PA_SAMPLE_ALAW;
|
||||
else if (!strcmp(s, "PCMU"))
|
||||
else if (pa_streq(s, "PCMU"))
|
||||
return PA_SAMPLE_ULAW;
|
||||
else
|
||||
return PA_SAMPLE_INVALID;
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
|
|||
*s2p = '\0';
|
||||
s2p -= 1;
|
||||
}
|
||||
if (c->waiting && 0 == strcmp("RTSP/1.0 200 OK", s2)) {
|
||||
if (c->waiting && pa_streq(s2, "RTSP/1.0 200 OK")) {
|
||||
c->waiting = 0;
|
||||
if (c->response_headers)
|
||||
pa_headerlist_free(c->response_headers);
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ int pa_sap_recv(pa_sap_context *c, pa_bool_t *goodbye) {
|
|||
e = buf + k;
|
||||
size -= (int) k;
|
||||
|
||||
if ((unsigned) size >= sizeof(MIME_TYPE) && !strcmp(e, MIME_TYPE)) {
|
||||
if ((unsigned) size >= sizeof(MIME_TYPE) && pa_streq(e, MIME_TYPE)) {
|
||||
e += sizeof(MIME_TYPE);
|
||||
size -= (int) sizeof(MIME_TYPE);
|
||||
} else if ((unsigned) size < sizeof(PA_SDP_HEADER)-1 || strncmp(e, PA_SDP_HEADER, sizeof(PA_SDP_HEADER)-1)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue