pidgin/pidgin
Clone
Summary
Browse
Changes
Graph
Use struct intializers for PurpleConnectionUiOps
19 months ago, Gary Kramlich
61b1b01b8de4
Parents
b55196b7ba2d
Children
ce790d508898
Use struct intializers for PurpleConnectionUiOps
Testing Done:
Compiled
Reviewed at https://reviews.imfreedom.org/r/1810/
2 files changed, 8 insertions(+), 22 deletions(-)
+2
-11
finch/gntconn.c
+6
-11
pidgin/gtkconn.c
--- a/finch/gntconn.c Tue Sep 20 01:34:26 2022 -0500
+++ b/finch/gntconn.c Tue Sep 20 02:08:42 2022 -0500
@@ -121,17 +121,8 @@
return &handle;
}
-static PurpleConnectionUiOps ops =
-{
- NULL, /* connected */
- NULL, /* disconnected */
- NULL, /* network_connected */
- NULL, /* network_disconnected */
- finch_connection_report_disconnect,
- NULL,
- NULL,
- NULL,
- NULL
+static PurpleConnectionUiOps ops = {
+ .report_disconnect = finch_connection_report_disconnect,
};
PurpleConnectionUiOps *finch_connections_get_ui_ops()
--- a/pidgin/gtkconn.c Tue Sep 20 01:34:26 2022 -0500
+++ b/pidgin/gtkconn.c Tue Sep 20 02:08:42 2022 -0500
@@ -164,17 +164,12 @@
}
}
-static PurpleConnectionUiOps conn_ui_ops =
-{
- pidgin_connection_connected,
- pidgin_connection_disconnected,
- pidgin_connection_network_connected,
- pidgin_connection_network_disconnected,
- pidgin_connection_report_disconnect,
- NULL,
- NULL,
- NULL,
- NULL
+static PurpleConnectionUiOps conn_ui_ops = {
+ .connected = pidgin_connection_connected,
+ .disconnected = pidgin_connection_disconnected,
+ .network_connected = pidgin_connection_network_connected,
+ .network_disconnected = pidgin_connection_network_disconnected,
+ .report_disconnect = pidgin_connection_report_disconnect,
};
PurpleConnectionUiOps *