@@ -50,8 +50,7 @@ static json_object *get_focused_container_r(json_object *c) {
5050 } else {
5151 json_object * nodes , * node , * child ;
5252 json_object_object_get_ex (c , "nodes" , & nodes );
53- int i ;
54- for (i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
53+ for (json_ar_len_t i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
5554 node = json_object_array_get_idx (nodes , i );
5655
5756 if ((child = get_focused_container_r (node ))) {
@@ -60,7 +59,7 @@ static json_object *get_focused_container_r(json_object *c) {
6059 }
6160
6261 json_object_object_get_ex (c , "floating_nodes" , & nodes );
63- for (i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
62+ for (json_ar_len_t i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
6463 node = json_object_array_get_idx (nodes , i );
6564
6665 if ((child = get_focused_container_r (node ))) {
@@ -83,7 +82,7 @@ char *get_focused_output() {
8382 if (!outputs ) {
8483 sway_abort ("Unabled to get focused output. No nodes in tree." );
8584 }
86- for (int i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
85+ for (json_ar_len_t i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
8786 output = json_object_array_get_idx (outputs , i );
8887
8988 if (get_focused_container_r (output )) {
@@ -131,7 +130,7 @@ json_object *get_output_container(const char *output) {
131130 json_object * outputs , * json_output , * name ;
132131 json_object_object_get_ex (tree , "nodes" , & outputs );
133132
134- for (int i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
133+ for (json_ar_len_t i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
135134 json_output = json_object_array_get_idx (outputs , i );
136135 json_object_object_get_ex (json_output , "name" , & name );
137136
0 commit comments