tizenaudio-policy, stream-manager: Revise label name for goto statement 53/83453/5
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 11 Aug 2016 04:54:57 +0000 (13:54 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 18 Aug 2016 05:28:04 +0000 (14:28 +0900)
[Version] 5.0.69
[Profile] Common
[Issue Type] Naming

Change-Id: If716c01b4f2b94b0f279253f75aa8b1f7ecfed31
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/pulseaudio-modules-tizen.spec
src/stream-manager-volume.c
src/stream-manager.c

index 03629e3a7bdc7b0c21557b81699c206cac7f2917..e8c2c2af39adda4b1ea2787e71aed2afe63e5bc7 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.68
+Version:          5.0.69
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index 6cc6ff0ae9443f2440186e85ff36c8e53d0cab57..e1d922f16760108e5203bcd14d46453a19b5c396 100644 (file)
@@ -94,7 +94,7 @@ static int load_out_volume_conf_file(pa_stream_manager *m) {
         if (!dict) {
             pa_log_warn("Loading default volume & gain table from ini file failed");
             ret = -1;
-            goto FAILURE;
+            goto finish;
         }
     }
 
@@ -124,7 +124,7 @@ static int load_out_volume_conf_file(pa_stream_manager *m) {
         } else {
             pa_log_error("failed to pa_xmalloc0()");
             ret = -1;
-            goto FAILURE;
+            goto finish;
         }
         if (key) {
             free(key);
@@ -152,7 +152,7 @@ static int load_out_volume_conf_file(pa_stream_manager *m) {
         } else {
             pa_log_error("failed to pa_xmalloc0()");
             ret = -1;
-            goto FAILURE;
+            goto finish;
         }
         if (key) {
             free(key);
@@ -160,7 +160,7 @@ static int load_out_volume_conf_file(pa_stream_manager *m) {
         }
     }
 
-FAILURE:
+finish:
     if (key)
         free(key);
     if (dict)
index c59134243ce38ed375e2f55d21e5a03760877ddd..e9f168bf63acd6fb59b0fd004e95cae4b48a6e60 100644 (file)
@@ -680,7 +680,7 @@ static void handle_set_stream_route_devices(DBusConnection *conn, DBusMessage *m
     if (sp) {
         if (!in_device_list && !out_device_list) {
             pa_log_error("invalid arguments");
-            goto FAILURE;
+            goto fail;
         }
 
         if (sp->idx_route_in_devices) {
@@ -717,7 +717,7 @@ static void handle_set_stream_route_devices(DBusConnection *conn, DBusMessage *m
             }
         } else {
             pa_log_error("failed to update, idx_route_in_devices[%p]", sp->idx_route_in_devices);
-            goto FAILURE;
+            goto fail;
         }
 
         if (sp->idx_route_out_devices) {
@@ -754,18 +754,18 @@ static void handle_set_stream_route_devices(DBusConnection *conn, DBusMessage *m
             }
         } else {
             pa_log_error("failed to update, idx_route_out_devices[%p]", sp->idx_route_out_devices);
-            goto FAILURE;
+            goto fail;
         }
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_OK], DBUS_TYPE_INVALID));
     } else {
         pa_log_error("could not find matching client for this parent_id[%u]", id);
-        goto FAILURE;
+        goto fail;
     }
 
     pa_assert_se(dbus_connection_send(conn, reply, NULL));
     dbus_message_unref(reply);
     return;
-FAILURE:
+fail:
     pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_ERROR], DBUS_TYPE_INVALID));
     pa_assert_se(dbus_connection_send(conn, reply, NULL));
     dbus_message_unref(reply);
@@ -867,7 +867,7 @@ static void handle_set_volume_level(DBusConnection *conn, DBusMessage *msg, void
     else {
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_ERROR], DBUS_TYPE_INVALID));
         ret = -1;
-        goto FAILURE;
+        goto finish;
     }
 
     if ((ret = set_volume_level_by_type(m, stream_type, type, level)))
@@ -875,7 +875,7 @@ static void handle_set_volume_level(DBusConnection *conn, DBusMessage *msg, void
     else
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_OK], DBUS_TYPE_INVALID));
 
-FAILURE:
+finish:
     pa_assert_se(dbus_connection_send(conn, reply, NULL));
     dbus_message_unref(reply);
 
@@ -912,7 +912,7 @@ static void handle_get_volume_level(DBusConnection *conn, DBusMessage *msg, void
     else {
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_UINT32, 0, DBUS_TYPE_INVALID));
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_ERROR], DBUS_TYPE_INVALID));
-        goto FAILURE;
+        goto finish;
     }
 
     if (get_volume_level_by_type(m, GET_VOLUME_CURRENT_LEVEL, stream_type, type, &level)) {
@@ -923,7 +923,7 @@ static void handle_get_volume_level(DBusConnection *conn, DBusMessage *msg, void
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_OK], DBUS_TYPE_INVALID));
     }
 
-FAILURE:
+finish:
     pa_assert_se(dbus_connection_send(conn, reply, NULL));
     dbus_message_unref(reply);
     return;
@@ -956,7 +956,7 @@ static void handle_get_volume_max_level(DBusConnection *conn, DBusMessage *msg,
     else {
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_UINT32, 0, DBUS_TYPE_INVALID));
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_ERROR], DBUS_TYPE_INVALID));
-        goto FAILURE;
+        goto finish;
     }
 
     if (get_volume_level_by_type(m, GET_VOLUME_MAX_LEVEL, stream_type, type, &level)) {
@@ -966,7 +966,7 @@ static void handle_get_volume_max_level(DBusConnection *conn, DBusMessage *msg,
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_UINT32, &level, DBUS_TYPE_INVALID));
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_OK], DBUS_TYPE_INVALID));
     }
-FAILURE:
+finish:
     pa_assert_se(dbus_connection_send(conn, reply, NULL));
     dbus_message_unref(reply);
     return;
@@ -999,7 +999,7 @@ static void handle_set_volume_mute(DBusConnection *conn, DBusMessage *msg, void
         stream_type = STREAM_SINK_INPUT;
     else {
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_ERROR], DBUS_TYPE_INVALID));
-        goto FAILURE;
+        goto finish;
     }
 
     if (set_volume_mute_by_type(m, stream_type, type, (bool)do_mute))
@@ -1007,7 +1007,7 @@ static void handle_set_volume_mute(DBusConnection *conn, DBusMessage *msg, void
     else
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_OK], DBUS_TYPE_INVALID));
 
-FAILURE:
+finish:
     pa_assert_se(dbus_connection_send(conn, reply, NULL));
     dbus_message_unref(reply);
     return;
@@ -1040,7 +1040,7 @@ static void handle_get_volume_mute(DBusConnection *conn, DBusMessage *msg, void
     else {
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_UINT32, 0, DBUS_TYPE_INVALID));
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_ERROR], DBUS_TYPE_INVALID));
-        goto FAILURE;
+        goto fail;
     }
 
     if (get_volume_mute_by_type(m, stream_type, type, (bool*)&is_muted)) {
@@ -1051,7 +1051,7 @@ static void handle_get_volume_mute(DBusConnection *conn, DBusMessage *msg, void
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_OK], DBUS_TYPE_INVALID));
     }
 
-FAILURE:
+fail:
     pa_assert_se(dbus_connection_send(conn, reply, NULL));
     dbus_message_unref(reply);
     return;
@@ -1084,7 +1084,7 @@ static void handle_get_current_volume_type(DBusConnection *conn, DBusMessage *ms
     else {
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &dbus_str_none, DBUS_TYPE_INVALID));
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_ERROR], DBUS_TYPE_INVALID));
-        goto FAILURE;
+        goto fail;
     }
 
     if ((s = (stream_type == STREAM_SINK_INPUT) ? (void*)(m->cur_highest_priority.sink_input) : (void*)(m->cur_highest_priority.source_output)))
@@ -1106,7 +1106,7 @@ static void handle_get_current_volume_type(DBusConnection *conn, DBusMessage *ms
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_ERROR_NO_STREAM], DBUS_TYPE_INVALID));
     }
 
-FAILURE:
+fail:
     pa_assert_se(dbus_connection_send(conn, reply, NULL));
     dbus_message_unref(reply);
     return;
@@ -1163,10 +1163,10 @@ static void handle_update_focus_status(DBusConnection *conn, DBusMessage *msg, v
     } else {
         pa_log_error("could not find matching client for this parent_id[%u]", id);
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_ERROR], DBUS_TYPE_INVALID));
-        goto FAILURE;
+        goto fail;
     }
     pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_OK], DBUS_TYPE_INVALID));
-FAILURE:
+fail:
     pa_assert_se(dbus_connection_send(conn, reply, NULL));
     dbus_message_unref(reply);
     return;
@@ -1192,11 +1192,11 @@ static void handle_update_restriction(DBusConnection *conn, DBusMessage *msg, vo
 
     if (handle_restrictions(m, name, value) < 0) {
         pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_ERROR], DBUS_TYPE_INVALID));
-        goto FAILURE;
+        goto fail;
     }
 
     pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_INDEX_OK], DBUS_TYPE_INVALID));
-FAILURE:
+fail:
     pa_assert_se(dbus_connection_send(conn, reply, NULL));
     dbus_message_unref(reply);
     return;
@@ -1409,42 +1409,42 @@ static int init_stream_map(pa_stream_manager *m) {
                     pa_log_debug(" - type : %s", type);
                 } else {
                     pa_log_error("Get type failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_LATENCY_FRAGSIZE_MS, &item_o) && json_object_is_type(item_o, json_type_int)) {
                     l->fragsize_ms = json_object_get_int(item_o);
                     pa_log_debug(" - fragsize-ms : %d", l->fragsize_ms);
                 } else {
                     pa_log_error("Get fragsize-ms failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_LATENCY_TLENGTH_MS, &item_o) && json_object_is_type(item_o, json_type_int)) {
                     l->tlength_ms = json_object_get_int(item_o);
                     pa_log_debug(" - tlength-ms : %d", l->tlength_ms);
                 } else {
                     pa_log_error("Get tlength-ms failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_LATENCY_MINREQ_MS, &item_o) && json_object_is_type(item_o, json_type_int)) {
                     l->minreq_ms = json_object_get_int(item_o);
                     pa_log_debug(" - minreq-ms : %d", l->minreq_ms);
                 } else {
                     pa_log_error("Get minreq-ms failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_LATENCY_PREBUF_MS, &item_o) && json_object_is_type(item_o, json_type_int)) {
                     l->prebuf_ms = json_object_get_int(item_o);
                     pa_log_debug(" - prebuf-ms : %d", l->prebuf_ms);
                 } else {
                     pa_log_error("Get prebuf-ms failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_LATENCY_MAXLENGTH, &item_o) && json_object_is_type(item_o, json_type_int)) {
                     l->maxlength = json_object_get_int(item_o);
                     pa_log_debug(" - maxlength : %d", l->maxlength);
                 } else {
                     pa_log_error("Get maxlength failed");
-                    goto failed;
+                    goto fail;
                 }
                 pa_hashmap_put(m->latency_infos, (void*)type, l);
             }
@@ -1464,14 +1464,14 @@ static int init_stream_map(pa_stream_manager *m) {
                     pa_log_debug(" - type : %s", type);
                 } else {
                     pa_log_error("Get volume type failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_VOLUME_IS_FOR_HAL, &item_o) && json_object_is_type(item_o, json_type_int)) {
                     v->is_hal_volume_type = (bool)json_object_get_int(item_o);
                     pa_log_debug(" - is-hal-volume : %d", v->is_hal_volume_type);
                 } else {
                     pa_log_error("Get is-hal-volume failed");
-                    goto failed;
+                    goto fail;
                 }
                 pa_hashmap_put(m->volume_infos, (void*)type, v);
             }
@@ -1492,42 +1492,42 @@ static int init_stream_map(pa_stream_manager *m) {
                     pa_log_debug(" - role : %s", role);
                 } else {
                     pa_log_error("Get stream role failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_STREAM_PRIORITY, &item_o) && json_object_is_type(item_o, json_type_int)) {
                     s->priority = json_object_get_int(item_o);
                     pa_log_debug(" - priority : %d", s->priority);
                 } else {
                     pa_log_error("Get stream priority failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_STREAM_ROUTE_TYPE, &item_o) && json_object_is_type(item_o, json_type_string)) {
                     if (convert_route_type(&(s->route_type), json_object_get_string(item_o))) {
                         pa_log_error("convert stream route-type failed");
-                        goto failed;
+                        goto fail;
                     }
                     pa_log_debug(" - route-type : %d", s->route_type);
                 } else {
                     pa_log_error("Get stream route-type failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_STREAM_VOLUME_TYPES, &sub_array_o) && json_object_is_type(sub_array_o, json_type_object)) {
                     if (json_object_object_get_ex(sub_array_o, STREAM_MAP_STREAM_VOLUME_TYPE_IN, &item_o) && json_object_is_type(item_o, json_type_string))
                         s->volume_types[STREAM_DIRECTION_IN] = json_object_get_string(item_o);
                     else {
                         pa_log_error("Get stream volume-type-in failed");
-                        goto failed;
+                        goto fail;
                     }
                     if (json_object_object_get_ex(sub_array_o, STREAM_MAP_STREAM_VOLUME_TYPE_OUT, &item_o) && json_object_is_type(item_o, json_type_string))
                         s->volume_types[STREAM_DIRECTION_OUT] = json_object_get_string(item_o);
                     else {
                         pa_log_error("Get stream volume-type-out failed");
-                        goto failed;
+                        goto fail;
                     }
                     pa_log_debug(" - volume-types : in[%s], out[%s]", s->volume_types[STREAM_DIRECTION_IN], s->volume_types[STREAM_DIRECTION_OUT]);
                 } else {
                     pa_log_error("Get stream volume-types failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_STREAM_AVAIL_IN_DEVICES, &sub_array_o) && json_object_is_type(sub_array_o, json_type_array)) {
                     j = 0;
@@ -1542,7 +1542,7 @@ static int init_stream_map(pa_stream_manager *m) {
                        }
                 } else {
                     pa_log_error("Get stream avail-in-devices failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_STREAM_AVAIL_OUT_DEVICES, &sub_array_o) && json_object_is_type(sub_array_o, json_type_array)) {
                     j = 0;
@@ -1557,7 +1557,7 @@ static int init_stream_map(pa_stream_manager *m) {
                        }
                 } else {
                     pa_log_error("Get stream avail-out-devices failed");
-                    goto failed;
+                    goto fail;
                 }
                 if (json_object_object_get_ex(array_item_o, STREAM_MAP_STREAM_AVAIL_FRAMEWORKS, &sub_array_o) && json_object_is_type(sub_array_o, json_type_array)) {
                     j = 0;
@@ -1572,20 +1572,20 @@ static int init_stream_map(pa_stream_manager *m) {
                        }
                 } else {
                     pa_log_error("Get stream avail-frameworks failed");
-                    goto failed;
+                    goto fail;
                 }
                 pa_hashmap_put(m->stream_infos, (void*)role, s);
             }
         }
     } else {
         pa_log_error("Get streams object failed");
-        goto failed;
+        goto fail;
     }
 
     dump_stream_map(m);
 
     return 0;
-failed:
+fail:
     pa_log_error("failed to initialize stream-map");
     if (m->stream_infos) {
         PA_HASHMAP_FOREACH(s, m->stream_infos, state) {
@@ -2408,7 +2408,7 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
         /* set it to null sink/source */
         if (is_new_data)
             SET_NEW_DATA_STREAM_TO_NULL_SINK_SOURCE(m, stream, type);
-        goto FAILURE;
+        goto finish;
     }
 
     if (command == PROCESS_COMMAND_PREPARE) {
@@ -2449,7 +2449,7 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
             /* skip roles */
             if (check_role_to_skip(m, role)) {
                 result = PROCESS_STREAM_RESULT_SKIP;
-                goto FAILURE;
+                goto finish;
             }
         }
         /* update the priority of this stream */
@@ -2457,14 +2457,14 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
         if (ret == false) {
             pa_log_error("could not update the priority of '%s' role.", role);
             result = PROCESS_STREAM_RESULT_STOP;
-            goto FAILURE;
+            goto finish;
         }
         /* update the route type of this stream */
         ret = update_route_type_of_stream(m, stream, type, role);
         if (ret == false) {
             pa_log_error("could not update the route type of '%s' role.", role);
             result = PROCESS_STREAM_RESULT_STOP;
-            goto FAILURE;
+            goto finish;
         }
         /* update the volume type of this stream */
         ret = update_volume_type_of_stream(m, stream, type, role);
@@ -2475,7 +2475,7 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
         if ((route_type_str = pa_proplist_gets(GET_STREAM_NEW_PROPLIST(stream, type), PA_PROP_MEDIA_ROLE_ROUTE_TYPE))) {
             if (check_route_type_to_skip(command, route_type_str)) {
                 result = PROCESS_STREAM_RESULT_SKIP;
-                goto FAILURE;
+                goto finish;
             }
         }
 
@@ -2503,13 +2503,13 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
         /* skip roles */
         if (check_role_to_skip(m, role)) {
             result = PROCESS_STREAM_RESULT_SKIP;
-            goto FAILURE;
+            goto finish;
         }
 
         /* skip route types */
         if (check_route_type_to_skip(command, route_type_str)) {
             result = PROCESS_STREAM_RESULT_SKIP;
-            goto FAILURE;
+            goto finish;
         }
 
         if (!is_new_data) {
@@ -2518,7 +2518,7 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
             if (ret == false) {
                 pa_log_error("could not update the priority of '%s' role.", role);
                 result = PROCESS_STREAM_RESULT_STOP;
-                goto FAILURE;
+                goto finish;
             }
         }
 
@@ -2532,7 +2532,7 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
         if (ret == false) {
             pa_log_error("could not update the highest priority stream");
             result = PROCESS_STREAM_RESULT_SKIP;
-            goto FAILURE;
+            goto finish;
         }
 
         /* need to skip if this stream does not belong to internal device */
@@ -2565,14 +2565,14 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
             /* skip roles */
             if (check_role_to_skip(m, role)) {
                 result = PROCESS_STREAM_RESULT_SKIP;
-                goto FAILURE;
+                goto finish;
             }
 
             /* skip route types */
             if ((route_type_str = pa_proplist_gets(GET_STREAM_PROPLIST(stream, type), PA_PROP_MEDIA_ROLE_ROUTE_TYPE))) {
                 if (check_route_type_to_skip(command, route_type_str)) {
                     result = PROCESS_STREAM_RESULT_SKIP;
-                    goto FAILURE;
+                    goto finish;
                 }
             }
 
@@ -2580,7 +2580,7 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
             if (pa_proplist_get(GET_STREAM_PROPLIST(stream, type), PA_PROP_MEDIA_ROLE_PRIORITY, (const void**)&prior_priority, &size)) {
                 pa_log_debug("it has already been processed for PROCESS_COMMAND_CHANGE_ROUTE_BY_STREAM_ENDED, skip it..");
                 result = PROCESS_STREAM_RESULT_SKIP;
-                goto FAILURE;
+                goto finish;
             }
 
             pa_proplist_unset(GET_STREAM_PROPLIST(stream, type), PA_PROP_MEDIA_ROLE_PRIORITY);
@@ -2588,7 +2588,7 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
             if (ret == false) {
                 pa_log_error("could not update the highest priority stream");
                 result = PROCESS_STREAM_RESULT_STOP;
-                goto FAILURE;
+                goto finish;
             }
 
             do_notify(m, NOTIFY_COMMAND_INFORM_STREAM_DISCONNECTED, type, false, stream);
@@ -2608,14 +2608,14 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
             /* skip roles */
             if (check_role_to_skip(m, role)) {
                 result = PROCESS_STREAM_RESULT_SKIP;
-                goto FAILURE;
+                goto finish;
             }
 
             /* skip route types */
             if ((route_type_str = pa_proplist_gets(GET_STREAM_PROPLIST(stream, type), PA_PROP_MEDIA_ROLE_ROUTE_TYPE))) {
                 if (check_route_type_to_skip(command, route_type_str)) {
                     result = PROCESS_STREAM_RESULT_SKIP;
-                    goto FAILURE;
+                    goto finish;
                 }
             }
 
@@ -2623,7 +2623,7 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
             if (ret == false) {
                 pa_log_error("could not update the highest priority stream");
                 result = PROCESS_STREAM_RESULT_STOP;
-                goto FAILURE;
+                goto finish;
             }
 
             /* need to skip if this stream does not belong to internal device */
@@ -2656,14 +2656,14 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
             /* skip roles */
             if (check_role_to_skip(m, role)) {
                 result = PROCESS_STREAM_RESULT_SKIP;
-                goto FAILURE;
+                goto finish;
             }
 
             /* skip route types */
             if ((route_type_str = pa_proplist_gets(GET_STREAM_PROPLIST(stream, type), PA_PROP_MEDIA_ROLE_ROUTE_TYPE))) {
                 if (check_route_type_to_skip(command, route_type_str)) {
                     result = PROCESS_STREAM_RESULT_SKIP;
-                    goto FAILURE;
+                    goto finish;
                 }
             }
 
@@ -2694,7 +2694,7 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
         update_buffer_attribute(m, stream, type, is_new_data);
     }
 
-FAILURE:
+finish:
     pa_log_debug("<<< process_stream(%s): result(%d), stream(%p)", process_command_type_str[command], result, stream);
     return result;
 }