NetworkManager/clients/tui
Thomas Haller 52dbab7d07 all: use nm_clear_pointer() instead of g_clear_pointer()
g_clear_pointer() would always cast the destroy notify function
pointer to GDestroyNotify. That means, it lost some type safety, like

   GPtrArray *ptr_arr = ...

   g_clear_pointer (&ptr_arr, g_array_unref);

Since glib 2.58 ([1]), g_clear_pointer() is also more type safe. But
this is not used by NetworkManager, because we don't set
GLIB_VERSION_MIN_REQUIRED to 2.58.

[1] f9a9902aac

We have nm_clear_pointer() to avoid this issue for a long time (pre
1.12.0). Possibly we should redefine in our source tree g_clear_pointer()
as nm_clear_pointer(). However, I don't like to patch glib functions
with our own variant. Arguably, we do patch g_clear_error() in
such a manner. But there the point is to make the function inlinable.

Also, nm_clear_pointer() returns a boolean that indicates whether
anything was cleared. That is sometimes useful. I think we should
just consistently use nm_clear_pointer() instead, which does always
the preferable thing.

Replace:

   sed 's/\<g_clear_pointer *(\([^;]*\), *\([a-z_A-Z0-9]\+\) *)/nm_clear_pointer (\1, \2)/g' $(git grep -l g_clear_pointer) -i
2020-03-23 11:22:38 +01:00
..
newt all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
meson.build tui: create NMClient instance via async init 2019-12-10 09:17:17 +01:00
nm-editor-bindings.c all: use nm_utils_ipaddr_is_valid() instead of nm_utils_ipaddr_valid() 2020-01-28 11:17:41 +01:00
nm-editor-bindings.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-editor-utils.c nmtui: only set 'mode' and enable 'miimon' when setting up a new connection 2020-03-06 10:39:00 +01:00
nm-editor-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-address-list.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-address-list.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-connect-connection-list.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
nmt-connect-connection-list.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-device-entry.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
nmt-device-entry.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-edit-connection-list.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-edit-connection-list.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-editor-grid.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
nmt-editor-grid.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-editor-page-device.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-editor-page-device.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-editor-page.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-editor-page.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-editor-section.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-editor-section.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-editor.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-editor.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-ip-entry.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-ip-entry.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-mac-entry.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-mac-entry.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-mtu-entry.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-mtu-entry.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-bond.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-bond.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-bridge-port.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-bridge-port.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-bridge.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-bridge.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-dsl.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-dsl.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-ethernet.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-ethernet.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-infiniband.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-infiniband.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-ip-tunnel.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-ip-tunnel.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-ip4.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-ip4.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-ip6.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-ip6.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-ppp.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-ppp.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-team-port.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
nmt-page-team-port.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-team.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
nmt-page-team.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-vlan.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-vlan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-page-wifi.c client/tui: add OWE support 2019-12-05 14:00:10 +01:00
nmt-page-wifi.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-password-dialog.c all: use nm_clear_pointer() instead of g_clear_pointer() 2020-03-23 11:22:38 +01:00
nmt-password-dialog.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-password-fields.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-password-fields.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-route-editor.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-route-editor.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-route-entry.c all: use nm_clear_pointer() instead of g_clear_pointer() 2020-03-23 11:22:38 +01:00
nmt-route-entry.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-route-table.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-route-table.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-slave-list.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-slave-list.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-utils.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-widget-list.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmt-widget-list.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmtui-connect.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmtui-connect.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmtui-edit.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmtui-edit.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmtui-hostname.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmtui-hostname.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nmtui.c tui: don't fetch permissions for NMClient in nmtui 2019-12-10 09:17:17 +01:00
nmtui.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00