From 141c4e926be3a74faa006292dd5c7cb27e5a5a01 Mon Sep 17 00:00:00 2001 From: chme Date: Wed, 27 Dec 2017 09:33:06 +0100 Subject: [PATCH] [mpd] Formatting of channel and sticker handler list --- src/mpd.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/src/mpd.c b/src/mpd.c index b6b2fdb4..bf46df55 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -3448,14 +3448,16 @@ struct mpd_sticker_command { int need_args; }; -static struct mpd_sticker_command mpd_sticker_handlers[] = { - { "get", mpd_sticker_get, 5 }, - { "set", mpd_sticker_set, 6 }, - { "delete", mpd_sticker_delete, 5 }, - { "list", mpd_sticker_list, 4 }, - { "find", mpd_sticker_find, 5 }, - { NULL, NULL, 0 }, -}; +static struct mpd_sticker_command mpd_sticker_handlers[] = + { + /* sticker command | handler function | minimum argument count */ + { "get", mpd_sticker_get, 5 }, + { "set", mpd_sticker_set, 6 }, + { "delete", mpd_sticker_delete, 5 }, + { "list", mpd_sticker_list, 4 }, + { "find", mpd_sticker_find, 5 }, + { NULL, NULL, 0 }, + }; /* * Command handler function for 'sticker' @@ -4042,22 +4044,11 @@ struct mpd_channel static struct mpd_channel mpd_channels[] = { - { - .channel = "outputvolume", - .handler = channel_outputvolume - }, - { - .channel = "pairing", - .handler = channel_pairing - }, - { - .channel = "verification", - .handler = channel_verification - }, - { - .channel = NULL, - .handler = NULL - }, + /* channel | handler function */ + { "outputvolume", channel_outputvolume }, + { "pairing", channel_pairing }, + { "verification", channel_verification }, + { NULL, NULL }, }; /*