Code

screen_queue: no typedef for completion_callback_data_t
authorMax Kellermann <max.kellermann@gmail.com>
Wed, 2 Aug 2017 07:30:05 +0000 (09:30 +0200)
committerMax Kellermann <max.kellermann@gmail.com>
Wed, 2 Aug 2017 07:30:05 +0000 (09:30 +0200)
src/screen_queue.c

index bc370d338611c08b671cf9f186e5c80090dfa074..a5383fa19927d6536db98f7f60cc0aff7450415a 100644 (file)
@@ -199,16 +199,15 @@ static void add_dir(GCompletion *gcmp, gchar *dir, GList **dir_list,
        *dir_list = g_list_append(*dir_list, g_strdup(dir));
 }
 
-typedef struct
-{
+struct completion_callback_data {
        GList **list;
        GList **dir_list;
        struct mpdclient *c;
-} completion_callback_data_t;
+};
 
 static void add_pre_completion_cb(GCompletion *gcmp, gchar *line, void *data)
 {
-       completion_callback_data_t *tmp = (completion_callback_data_t *)data;
+       struct completion_callback_data *tmp = data;
        GList **dir_list = tmp->dir_list;
        GList **list = tmp->list;
        struct mpdclient *c = tmp->c;
@@ -227,7 +226,7 @@ static void add_pre_completion_cb(GCompletion *gcmp, gchar *line, void *data)
 static void add_post_completion_cb(GCompletion *gcmp, gchar *line,
                                   GList *items, void *data)
 {
-       completion_callback_data_t *tmp = (completion_callback_data_t *)data;
+       struct completion_callback_data *tmp = data;
        GList **dir_list = tmp->dir_list;
        GList **list = tmp->list;
        struct mpdclient *c = tmp->c;
@@ -253,7 +252,7 @@ handle_add_to_playlist(struct mpdclient *c)
 
        GList *list = NULL;
        GList *dir_list = NULL;
-       completion_callback_data_t data = {
+       struct completion_callback_data data = {
                .list = &list,
                .dir_list = &dir_list,
                .c = c,