[PATCH weston 2/2] libweston/launcher: use C99 initializers for the iface(s)

Emil Velikov emil.l.velikov at gmail.com
Fri Feb 10 20:14:23 UTC 2017


Makes the code easier to read and browse through.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 libweston/launcher-direct.c        | 14 +++++++-------
 libweston/launcher-logind.c        | 14 +++++++-------
 libweston/launcher-weston-launch.c | 14 +++++++-------
 3 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/libweston/launcher-direct.c b/libweston/launcher-direct.c
index 8a961ee6..fe47d138 100644
--- a/libweston/launcher-direct.c
+++ b/libweston/launcher-direct.c
@@ -317,11 +317,11 @@ launcher_direct_get_vt(struct weston_launcher *base)
 }
 
 const struct launcher_interface launcher_direct_iface = {
-	launcher_direct_connect,
-	launcher_direct_destroy,
-	launcher_direct_open,
-	launcher_direct_close,
-	launcher_direct_activate_vt,
-	launcher_direct_restore,
-	launcher_direct_get_vt,
+	.connect = launcher_direct_connect,
+	.destroy = launcher_direct_destroy,
+	.open = launcher_direct_open,
+	.close = launcher_direct_close,
+	.activate_vt = launcher_direct_activate_vt,
+	.restore = launcher_direct_restore,
+	.get_vt = launcher_direct_get_vt,
 };
diff --git a/libweston/launcher-logind.c b/libweston/launcher-logind.c
index c9cd75b7..8de1ed11 100644
--- a/libweston/launcher-logind.c
+++ b/libweston/launcher-logind.c
@@ -838,11 +838,11 @@ launcher_logind_get_vt(struct weston_launcher *launcher)
 }
 
 const struct launcher_interface launcher_logind_iface = {
-	launcher_logind_connect,
-	launcher_logind_destroy,
-	launcher_logind_open,
-	launcher_logind_close,
-	launcher_logind_activate_vt,
-	launcher_logind_restore,
-	launcher_logind_get_vt,
+	.connect = launcher_logind_connect,
+	.destroy = launcher_logind_destroy,
+	.open = launcher_logind_open,
+	.close = launcher_logind_close,
+	.activate_vt = launcher_logind_activate_vt,
+	.restore = launcher_logind_restore,
+	.get_vt = launcher_logind_get_vt,
 };
diff --git a/libweston/launcher-weston-launch.c b/libweston/launcher-weston-launch.c
index 36337c76..7079d03e 100644
--- a/libweston/launcher-weston-launch.c
+++ b/libweston/launcher-weston-launch.c
@@ -288,11 +288,11 @@ launcher_weston_launch_get_vt(struct weston_launcher *base)
 }
 
 const struct launcher_interface launcher_weston_launch_iface = {
-	launcher_weston_launch_connect,
-	launcher_weston_launch_destroy,
-	launcher_weston_launch_open,
-	launcher_weston_launch_close,
-	launcher_weston_launch_activate_vt,
-	launcher_weston_launch_restore,
-	launcher_weston_launch_get_vt,
+	.connect = launcher_weston_launch_connect,
+	.destroy = launcher_weston_launch_destroy,
+	.open = launcher_weston_launch_open,
+	.close = launcher_weston_launch_close,
+	.activate_vt = launcher_weston_launch_activate_vt,
+	.restore = launcher_weston_launch_restore,
+	.get_vt = launcher_weston_launch_get_vt,
 };
-- 
2.11.0



More information about the wayland-devel mailing list