diff --git a/src/modules/mixer/app_mixer.c b/src/modules/mixer/app_mixer.c index 1131cbd9a..1405111f1 100644 --- a/src/modules/mixer/app_mixer.c +++ b/src/modules/mixer/app_mixer.c @@ -176,13 +176,13 @@ _populate_channel_editor(E_Mixer_App_Dialog_Data *app) const char *card_name; card_name = e_mod_mixer_card_name_get(app->card); - + if (!card_name) { _disable_channel_editor(app); return; } - + e_widget_entry_text_set(ui->card, card_name); eina_stringshare_del(card_name); @@ -380,7 +380,7 @@ _create_cards(E_Dialog *dialog __UNUSED__, Evas *evas, E_Mixer_App_Dialog_Data * const char *card_name; card_name = e_mod_mixer_card_name_get(card); - + if (!card_name) continue; @@ -566,7 +566,7 @@ _find_card_by_name(E_Mixer_App_Dialog_Data *app, const char *card_name) if (!card_name) return 0; - + for (i = 0, l = app->cards; l; i++, l = l->next) if (strcmp(card_name, l->data) == 0) return i; @@ -584,7 +584,7 @@ _find_channel_by_name(E_Mixer_App_Dialog_Data *app, const char *channel_name) if (!channel_name) return 0; - + if (app->channels_infos) { info = app->channels_infos->data; @@ -618,7 +618,7 @@ e_mixer_app_dialog_select(E_Dialog *dialog, const char *card_name, const char *c if (!dialog) return 0; - + if ((!card_name) || (!channel_name)) return 0; diff --git a/src/modules/mixer/conf_gadget.c b/src/modules/mixer/conf_gadget.c index 8247292ec..795bbc295 100644 --- a/src/modules/mixer/conf_gadget.c +++ b/src/modules/mixer/conf_gadget.c @@ -337,7 +337,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) return NULL; e_dialog_resizable_set(cfd->dia, 1); - + cfdata->ui.table = e_widget_table_add(evas, 0); _basic_create_general(evas, cfdata); _basic_create_cards(evas, cfdata); diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c index 7c29dcf75..438e963c2 100644 --- a/src/modules/mixer/e_mod_main.c +++ b/src/modules/mixer/e_mod_main.c @@ -850,7 +850,7 @@ _mixer_sys_setup(E_Mixer_Instance *inst) ERR("conf->card in mixer sys setup is NULL"); return 1; } - + if (inst->sys) e_mod_mixer_del(inst->sys); @@ -1018,7 +1018,7 @@ e_mod_mixer_pulse_update(void) ctxt = mixer_mod->data; EINA_LIST_FOREACH(ctxt->instances, l, inst) { - if (inst->conf->using_default) + if (inst->conf->using_default) _mixer_sys_setup_default_card(inst); e_mod_mixer_state_get(inst->sys, inst->channel, &inst->mixer_state); _mixer_gadget_update(inst); diff --git a/src/modules/mixer/msg.c b/src/modules/mixer/msg.c index 078c4e04c..5bb091c9c 100644 --- a/src/modules/mixer/msg.c +++ b/src/modules/mixer/msg.c @@ -44,7 +44,7 @@ msg_recv_creds(Pulse *conn, Pulse_Tag *tag) #else conn = NULL; tag = NULL; -#endif +#endif } Eina_Bool @@ -91,14 +91,14 @@ msg_recv(Pulse *conn, Pulse_Tag *tag) #else conn = NULL; tag = NULL; -#endif +#endif return EINA_FALSE; } void msg_sendmsg_creds(Pulse *conn, Pulse_Tag *tag) { -#ifdef __linux__ +#ifdef __linux__ int r; struct msghdr mh; struct iovec iov; @@ -144,13 +144,13 @@ msg_sendmsg_creds(Pulse *conn, Pulse_Tag *tag) #else conn = NULL; tag = NULL; -#endif +#endif } void msg_send_creds(Pulse *conn, Pulse_Tag *tag) { -#ifdef __linux__ +#ifdef __linux__ int r; INF("trying to send 20 byte auth header"); diff --git a/src/modules/mixer/pa.c b/src/modules/mixer/pa.c index d1acf3d8b..a128662e1 100644 --- a/src/modules/mixer/pa.c +++ b/src/modules/mixer/pa.c @@ -57,11 +57,11 @@ proplist_init(Pulse_Tag *tag) snprintf(pid, sizeof(pid), "%"PRIu32, getpid()); eina_hash_add(tag->props, "application.process.id", eina_stringshare_add(pid)); tag->dsize += PA_TAG_SIZE_ARBITRARY + sizeof("application.process.id") + strlen(pid) + 2 + PA_TAG_SIZE_U32; - + str = getenv("USER"); eina_hash_add(tag->props, "application.process.user", eina_stringshare_add(str)); tag->dsize += PA_TAG_SIZE_ARBITRARY + sizeof("application.process.user") + strlen(str) + 2 + PA_TAG_SIZE_U32; - + file = eina_file_open("/etc/hostname", EINA_FALSE); if (file) { @@ -77,7 +77,7 @@ proplist_init(Pulse_Tag *tag) eina_hash_add(tag->props, "application.process.host", eina_stringshare_add("")); tag->dsize += PA_TAG_SIZE_ARBITRARY + sizeof("application.process.host") + 2 + PA_TAG_SIZE_U32; } - + ecore_app_args_get(&argc, &argv); str = strrchr(argv[0], '/'); str = (str) ? str + 1 : argv[0]; @@ -85,14 +85,14 @@ proplist_init(Pulse_Tag *tag) tag->dsize += PA_TAG_SIZE_ARBITRARY + sizeof("application.process.binary") + strlen(str) + 2 + PA_TAG_SIZE_U32; eina_hash_add(tag->props, "application.name", eina_stringshare_add(str)); tag->dsize += PA_TAG_SIZE_ARBITRARY + sizeof("application.name") + strlen(str) + 2 + PA_TAG_SIZE_U32; - + str = getenv("LANG"); if (str) { eina_hash_add(tag->props, "application.language", eina_stringshare_add(str)); tag->dsize += PA_TAG_SIZE_ARBITRARY + sizeof("application.language") + strlen(str) + 2 + PA_TAG_SIZE_U32; } - + str = getenv("DISPLAY"); if (str) { @@ -136,7 +136,7 @@ cookie_file(uint8_t *cookie) size_t size; void *cookie_data; - snprintf(buf, sizeof(buf), "%s/.pulse-cookie", getenv("HOME")); + snprintf(buf, sizeof(buf), "%s/.pulse-cookie", getenv("HOME")); file = eina_file_open(buf, EINA_FALSE); size = eina_file_size_get(file); cookie_data = eina_file_map_all(file, EINA_FILE_WILLNEED); @@ -151,26 +151,26 @@ login_setup(Pulse *conn) Pulse_Tag *tag; uint32_t x; uint8_t cookie[PA_NATIVE_COOKIE_LENGTH]; - + tag = calloc(1, sizeof(Pulse_Tag)); tag->dsize = 4 * PA_TAG_SIZE_U32 + sizeof(cookie); tag->data = malloc(tag->dsize); tag_simple_init(conn, tag, PA_COMMAND_AUTH, PA_TAG_U32); DBG("%zu bytes", tag->dsize); - + if (!getuid()) x = PA_PROTOCOL_VERSION; else x = PA_PROTOCOL_VERSION | 0x80000000U; tag_uint32(tag, x); DBG("%zu bytes", tag->dsize); - + cookie_file(cookie); tag_arbitrary(tag, cookie, sizeof(cookie)); DBG("%zu bytes", tag->dsize); tag_finish(tag); - + return tag; } @@ -262,7 +262,7 @@ fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh) pa_write = !!ecore_main_fd_handler_active_get(fdh, ECORE_FD_WRITE) * ECORE_FD_WRITE; rprev = eina_list_data_get(conn->iq); wprev = eina_list_data_get(conn->oq); - + switch (conn->state) { case PA_STATE_INIT: @@ -274,7 +274,7 @@ fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh) if (!wprev->auth) msg_sendmsg_creds(conn, wprev); - + if (wprev->auth && msg_send(conn, wprev)) { @@ -326,7 +326,7 @@ fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh) Pulse_Tag *tag; PA_Commands command; if (!pulse_recv(conn, fdh, &tag)) break; - + command = (uintptr_t)eina_hash_find(conn->tag_handlers, &tag->tag_count); eina_hash_del_by_key(conn->tag_handlers, &tag->tag_count); deserialize_tag(conn, command, tag); @@ -623,7 +623,7 @@ int pulse_init(void) { if (pulse_init_count++) return pulse_init_count; - + eina_init(); ecore_init(); ecore_con_init(); diff --git a/src/modules/mixer/pa.h b/src/modules/mixer/pa.h index 4e5110404..1a0790152 100644 --- a/src/modules/mixer/pa.h +++ b/src/modules/mixer/pa.h @@ -253,7 +253,7 @@ typedef enum PA_TAG_SIZE_CVOLUME = 2, PA_TAG_SIZE_PROPLIST = 1 + PA_TAG_SIZE_STRING_NULL, PA_TAG_SIZE_VOLUME = 2 -} PA_Tag_Size; +} PA_Tag_Size; /** Volume specification: * PA_VOLUME_MUTED: silence; diff --git a/src/modules/mixer/serial.c b/src/modules/mixer/serial.c index ed3fc63bd..99678c0ad 100644 --- a/src/modules/mixer/serial.c +++ b/src/modules/mixer/serial.c @@ -16,7 +16,7 @@ deserialize_server_info(Pulse *conn, Pulse_Tag *tag) EINA_SAFETY_ON_FALSE_GOTO(untag_sample(tag, &spec), error); EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &ev->default_sink), error); EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &ev->default_source), error); - + return ev; error: pulse_server_info_free(ev); diff --git a/src/modules/mixer/sink.c b/src/modules/mixer/sink.c index 18cf2cd7b..c5134ca3f 100644 --- a/src/modules/mixer/sink.c +++ b/src/modules/mixer/sink.c @@ -264,7 +264,7 @@ pulse_sink_channel_names_get(Pulse_Sink *sink) { Eina_List *ret = NULL; unsigned int x; - + EINA_SAFETY_ON_NULL_RETURN_VAL(sink, NULL); for (x = 0; x < sink->volume.channels; x++) ret = eina_list_append(ret, pulse_sink_channel_id_get_name(sink, x)); @@ -275,7 +275,7 @@ unsigned int pulse_sink_channel_name_get_id(Pulse_Sink *sink, const char *name) { unsigned int x; - + EINA_SAFETY_ON_NULL_RETURN_VAL(sink, UINT_MAX); EINA_SAFETY_ON_NULL_RETURN_VAL(name, UINT_MAX); for (x = 0; x < sink->channel_map.channels; x++) diff --git a/src/modules/mixer/tag.c b/src/modules/mixer/tag.c index 60ab7645f..56d720771 100644 --- a/src/modules/mixer/tag.c +++ b/src/modules/mixer/tag.c @@ -174,7 +174,7 @@ untag_arbitrary(Pulse_Tag *tag, Eina_Binbuf **val) ret = tag->data + tag->size; if (*ret != PA_TAG_ARBITRARY) return 0; ret += PA_TAG_SIZE_ARBITRARY; - + *val = eina_binbuf_new(); eina_binbuf_append_length(*val, ret, len); ret += len; @@ -215,7 +215,7 @@ tag_proplist(Pulse_Tag *tag) ret = tag->data + tag->size; *ret = PA_TAG_PROPLIST, tag->size++; - + eina_hash_foreach(tag->props, (Eina_Hash_Foreach)tag_proplist_foreach, tag); return tag_string(tag, NULL); } @@ -303,7 +303,7 @@ untag_cvol(Pulse_Tag *tag, pa_cvolume *cvol) memcpy(&pa_vol, ret, sizeof(pa_vol)); cvol->values[x] = ntohl(pa_vol); } - + tag->size = ret - tag->data; return ret; }