Cleanup !! for bool

!!x makes no sense if x is bool (this is a leftover from the
convertion pa_bool_t -> bool, d806b197)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
Peter Meerwald 2014-10-23 15:00:29 +02:00
parent 3fb349296f
commit f390e6e974
12 changed files with 23 additions and 23 deletions

View file

@ -1009,11 +1009,11 @@ int main(int argc, char *argv[]) {
c->scache_idle_time = conf->scache_idle_time;
c->resample_method = conf->resample_method;
c->realtime_priority = conf->realtime_priority;
c->realtime_scheduling = !!conf->realtime_scheduling;
c->disable_remixing = !!conf->disable_remixing;
c->disable_lfe_remixing = !!conf->disable_lfe_remixing;
c->deferred_volume = !!conf->deferred_volume;
c->running_as_daemon = !!conf->daemonize;
c->realtime_scheduling = conf->realtime_scheduling;
c->disable_remixing = conf->disable_remixing;
c->disable_lfe_remixing = conf->disable_lfe_remixing;
c->deferred_volume = conf->deferred_volume;
c->running_as_daemon = conf->daemonize;
c->disallow_exit = conf->disallow_exit;
c->flat_volumes = conf->flat_volumes;
#ifdef HAVE_DBUS
@ -1081,7 +1081,7 @@ int main(int argc, char *argv[]) {
/* We completed the initial module loading, so let's disable it
* from now on, if requested */
c->disallow_module_loading = !!conf->disallow_module_loading;
c->disallow_module_loading = conf->disallow_module_loading;
#ifdef HAVE_DBUS
if (!conf->system_instance) {

View file

@ -304,9 +304,9 @@ static void command_suspended(pa_pdispatch *pd, uint32_t command, uint32_t tag
pa_log_debug("Server reports device suspend.");
#ifdef TUNNEL_SINK
pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(!!suspended), 0, NULL);
pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(suspended), 0, NULL);
#else
pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(!!suspended), 0, NULL);
pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(suspended), 0, NULL);
#endif
request_latency(u);
@ -337,9 +337,9 @@ static void command_moved(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa
pa_log_debug("Server reports a stream move.");
#ifdef TUNNEL_SINK
pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(!!suspended), 0, NULL);
pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(suspended), 0, NULL);
#else
pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(!!suspended), 0, NULL);
pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(suspended), 0, NULL);
#endif
request_latency(u);
@ -457,7 +457,7 @@ static void stream_cork(struct userdata *u, bool cork) {
#endif
pa_tagstruct_putu32(t, u->ctag++);
pa_tagstruct_putu32(t, u->channel);
pa_tagstruct_put_boolean(t, !!cork);
pa_tagstruct_put_boolean(t, cork);
pa_pstream_send_tagstruct(u->pstream, t);
request_latency(u);
@ -1251,7 +1251,7 @@ static void sink_input_info_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag
pa_assert(u->sink);
if ((u->version < 11 || !!mute == !!u->sink->muted) &&
if ((u->version < 11 || mute == u->sink->muted) &&
pa_cvolume_equal(&volume, &u->sink->real_volume))
return;

View file

@ -398,7 +398,7 @@ int pa__init(pa_module*m) {
#endif
}
j = !!loop;
j = loop;
if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &j, sizeof(j)) < 0 ||
setsockopt(sap_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &j, sizeof(j)) < 0) {
pa_log("IP_MULTICAST_LOOP failed: %s", pa_cstrerror(errno));

View file

@ -831,7 +831,7 @@ static int try_next_connection(pa_context *c) {
if (!(c->client = pa_socket_client_new_string(c->mainloop, c->use_rtclock, u, PA_NATIVE_DEFAULT_PORT)))
continue;
c->is_local = !!pa_socket_client_is_local(c->client);
c->is_local = pa_socket_client_is_local(c->client);
pa_socket_client_set_callback(c->client, on_connection, c);
break;
}
@ -1230,7 +1230,7 @@ int pa_context_is_local(pa_context *c) {
PA_CHECK_VALIDITY_RETURN_ANY(c, !pa_detect_fork(), PA_ERR_FORKED, -1);
PA_CHECK_VALIDITY_RETURN_ANY(c, PA_CONTEXT_IS_GOOD(c->state), PA_ERR_BADSTATE, -1);
return !!c->is_local;
return c->is_local;
}
pa_operation* pa_context_set_name(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata) {

View file

@ -481,7 +481,7 @@ void pa_iochannel_set_callback(pa_iochannel*io, pa_iochannel_cb_t _callback, voi
void pa_iochannel_set_noclose(pa_iochannel*io, bool b) {
pa_assert(io);
io->no_close = !!b;
io->no_close = b;
}
void pa_iochannel_socket_peer_to_string(pa_iochannel*io, char*s, size_t l) {

View file

@ -910,7 +910,7 @@ int pa_mempool_get_shm_id(pa_mempool *p, uint32_t *id) {
bool pa_mempool_is_shared(pa_mempool *p) {
pa_assert(p);
return !!p->memory.shared;
return p->memory.shared;
}
/* For receiving blocks from other nodes */

View file

@ -174,7 +174,7 @@ static int proc_name_ours(pid_t pid, const char *procname) {
}
/*#endif*/
return !!good;
return good;
}
#else

View file

@ -179,7 +179,7 @@ void pa_sink_input_new_data_set_muted(pa_sink_input_new_data *data, bool mute) {
pa_assert(data);
data->muted_is_set = true;
data->muted = !!mute;
data->muted = mute;
}
bool pa_sink_input_new_data_set_sink(pa_sink_input_new_data *data, pa_sink *s, bool save) {

View file

@ -126,7 +126,7 @@ void pa_sink_new_data_set_muted(pa_sink_new_data *data, bool mute) {
pa_assert(data);
data->muted_is_set = true;
data->muted = !!mute;
data->muted = mute;
}
void pa_sink_new_data_set_port(pa_sink_new_data *data, const char *port) {

View file

@ -356,7 +356,7 @@ typedef struct pa_sink_new_data {
pa_channel_map channel_map;
uint32_t alternate_sample_rate;
pa_cvolume volume;
bool muted :1;
bool muted:1;
bool sample_spec_is_set:1;
bool channel_map_is_set:1;

View file

@ -122,7 +122,7 @@ void pa_source_output_new_data_set_muted(pa_source_output_new_data *data, bool m
pa_assert(data);
data->muted_is_set = true;
data->muted = !!mute;
data->muted = mute;
}
bool pa_source_output_new_data_set_source(pa_source_output_new_data *data, pa_source *s, bool save) {

View file

@ -117,7 +117,7 @@ void pa_source_new_data_set_muted(pa_source_new_data *data, bool mute) {
pa_assert(data);
data->muted_is_set = true;
data->muted = !!mute;
data->muted = mute;
}
void pa_source_new_data_set_port(pa_source_new_data *data, const char *port) {