Fix indent
[platform/upstream/pulseaudio.git] / src / utils / pactl.c
index d8921f1..8c292aa 100644 (file)
@@ -1028,23 +1028,23 @@ static void source_output_toggle_mute_callback(pa_context *c, const pa_source_ou
 }
 
 static void node_list_callback(pa_context *c,
-                              const pa_ext_node_manager_info *info,
-                              int eol,
-                              void *userdata) {
+                const pa_ext_node_manager_info *info,
+                int eol,
+                void *userdata) {
 
     if (!eol) {
-       const char *node_id = pa_proplist_gets(info->props, "index");
-       if (node_id != NULL) {
-           printf("Node #%s (%s)\n", node_id, info->name);
-           printf("%s\n", pa_proplist_to_string(info->props));
-       }
+        const char *node_id = pa_proplist_gets(info->props, "index");
+        if (node_id != NULL) {
+            printf("Node #%s (%s)\n", node_id, info->name);
+            printf("%s\n", pa_proplist_to_string(info->props));
+        }
     } else
-       complete_action();
+        complete_action();
 }
 
 static void node_connect_callback(pa_context *c,
-                           uint32_t conne_id,
-                           void *userdata) {
+                uint32_t conne_id,
+                void *userdata) {
 
     printf("New connection id: %d\n", conne_id);
 
@@ -1840,8 +1840,8 @@ static void context_state_callback(pa_context *c, void *userdata) {
                             o = pa_context_get_sample_info_list(c, get_sample_info_callback, NULL);
                         else if (pa_streq(list_type, "cards"))
                             o = pa_context_get_card_info_list(c, get_card_info_callback, NULL);
-                       else if (pa_streq(list_type, "nodes"))
-                           o = pa_ext_node_manager_read_nodes(c, node_list_callback, NULL);
+                        else if (pa_streq(list_type, "nodes"))
+                            o = pa_ext_node_manager_read_nodes(c, node_list_callback, NULL);
                         else if (pa_streq(list_type, "volume-controls")
                                      || pa_streq(list_type, "mute-controls")
                                      || pa_streq(list_type, "devices")
@@ -2062,18 +2062,20 @@ static void context_state_callback(pa_context *c, void *userdata) {
 
                     connect_to_volume_api();
                     break;
-               case NODE_CONNECT:
-                   pa_operation_unref(pa_ext_node_manager_connect_nodes(c,
-                                                                        src_node_id,
-                                                                        dst_node_id,
-                                                                        node_connect_callback,
-                                                                        NULL));
-                   break;
-               case NODE_DISCONNECT:
-                   pa_operation_unref(pa_ext_node_manager_disconnect_nodes(c, conn_id,
-                                                                       simple_callback,
-                                                                       NULL));
-                   break;
+
+                case NODE_CONNECT:
+                    pa_operation_unref(pa_ext_node_manager_connect_nodes(c,
+                                       src_node_id,
+                                       dst_node_id,
+                                       node_connect_callback,
+                                       NULL));
+                    break;
+
+                case NODE_DISCONNECT:
+                    pa_operation_unref(pa_ext_node_manager_disconnect_nodes(c, conn_id,
+                                       simple_callback,
+                                       NULL));
+                    break;
 
                 default:
                     pa_assert_not_reached();
@@ -2717,25 +2719,25 @@ int main(int argc, char *argv[]) {
             }
 
         } else if (pa_streq(argv[optind], "node-connect")) {
-           action = NODE_CONNECT;
+            action = NODE_CONNECT;
 
-           if (argc != optind+3) {
-               pa_log(_("You have to specify a source and destination node indexes"));
-               goto quit;
-           }
+            if (argc != optind+3) {
+                pa_log(_("You have to specify a source and destination node indexes"));
+                goto quit;
+            }
 
-           src_node_id = (uint32_t) atoi(argv[optind+1]);
-           dst_node_id = (uint32_t) atoi(argv[optind+2]);
+            src_node_id = (uint32_t) atoi(argv[optind+1]);
+            dst_node_id = (uint32_t) atoi(argv[optind+2]);
 
-       } else if (pa_streq(argv[optind], "node-disconnect")) {
-           action = NODE_DISCONNECT;
+        } else if (pa_streq(argv[optind], "node-disconnect")) {
+            action = NODE_DISCONNECT;
 
-           if (argc != optind+2) {
-               pa_log(_("You have to specify a connection id"));
-               goto quit;
-           }
+            if (argc != optind+2) {
+                pa_log(_("You have to specify a connection id"));
+                goto quit;
+            }
 
-           conn_id = (uint32_t) atoi(argv[optind+1]);
+            conn_id = (uint32_t) atoi(argv[optind+1]);
 
         } else if (pa_streq(argv[optind], "set-volume-control-volume")) {
             action = SET_VOLUME_CONTROL_VOLUME;
@@ -2789,7 +2791,7 @@ int main(int argc, char *argv[]) {
                 goto quit;
             }
 
-       } else if (pa_streq(argv[optind], "help")) {
+        } else if (pa_streq(argv[optind], "help")) {
             help(bn);
             ret = 0;
             goto quit;