NetworkManager/src/platform
Thomas Haller f0442a47ed all: avoid calling g_free on a const pointer with g_clear_pointer()
With g_clear_pointer(pptr, g_free), pptr is cast to a non-const pointer,
and hence there is no compiler warning about calling g_free() in a const
pointer. However, it still feels ugly to pass a const pointer to
g_clear_pointer(). We should either add an explicity cast, or just
make the pointer non-const.

I guess part of the problem is that C's "const char *" means that the
string itself is immutable, but also that it cannot be freed. We most
often want a different semantic: the string itself is immutable after
being initialized once, but the memory itself can and will be freed.
Such a notion of immutable C strings cannot be expressed.

For that, just remove the "const" from the declarations. Although we
don't want to modify the (content of the) string, it's still more a
mutable string.

Only in _vt_cmd_obj_copy_lnk_vlan(), add an explicity cast but keep the
type as const. The reason is, that we really want that NMPObject
instances are immutable (in the sense that they don't modify while
existing), but that doesn't mean the memory cannot be freed.
2018-03-19 15:45:46 +01:00
..
tests platform: don't require cloned flag for RTM_GETROUTE IPv6 result 2018-03-05 18:47:25 +01:00
wifi platform/wifi: don't pass ownership of message to nl80211_send_and_recv() 2018-02-24 12:35:28 +01:00
nm-fake-platform.c wifi: always build nl80211 CRIT_PROTOCOL support 2018-01-15 20:29:26 +01:00
nm-fake-platform.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-linux-platform.c platform: pre-increment netlink sequence number and add comment 2018-03-09 17:52:43 +01:00
nm-linux-platform.h platform: use NMDedupMultiIndex for routes in NMPCache 2017-07-05 18:37:38 +02:00
nm-netlink.c platform: print error message from netlink extended ack 2018-03-09 17:52:43 +01:00
nm-netlink.h platform: print error message from netlink extended ack 2018-03-09 17:52:43 +01:00
nm-platform-private.h platform: expose emit-signal function from platform 2017-07-05 18:37:39 +02:00
nm-platform-utils.c udev: drop libgudev in favor of libudev 2017-03-22 12:41:06 +01:00
nm-platform-utils.h udev: drop libgudev in favor of libudev 2017-03-22 12:41:06 +01:00
nm-platform.c platform: minor cleanup of assertions in nm_platform_cache_update_emit_signal() 2018-03-09 17:52:43 +01:00
nm-platform.h platform: add nm_platform_process_events_ensure_link() function 2018-02-21 20:28:46 +01:00
nmp-netns.c platform/netns: don't try to overlay ro /sys with a rw one 2018-02-12 20:46:47 +01:00
nmp-netns.h core: cleanup implementation of nm_auto* macros to use nm_auto() 2017-10-11 08:43:40 +02:00
nmp-object.c all: avoid calling g_free on a const pointer with g_clear_pointer() 2018-03-19 15:45:46 +01:00
nmp-object.h device: fix IPv6 DAD to re-check whether address really failed DAD 2018-02-09 17:40:01 +01:00