NetworkManager/shared/nm-glib-aux
Thomas Haller fbddd27e73 shared: fix type shenanigans for data pointer of nm_memdup_maybe_a()
The type of the "data" pointer may not be compatible with the type of
the "to_free" / output pointer. This is due to constness, and that we
are unable in C to remove constness from a type.

For example,

    {
        const char *const *data = ...;
        gs_free const char **cpy_to_free = NULL;
        const char **cpy;

        cpy = nm_memdup_maybe_a (300, data, NM_PTRARRAY_LEN (data) + 1, &cpy_to_free);
    }

is prefectly valid , but would not have compiled.

It shows that "data" is not of type "*(&cpy_to_free)", but rather
it might be a non-const pointer of the same type.

Fixes: d0e1d0e626 ('shared: propagate types in nm_malloc_maybe_a(), nm_malloc0_maybe_a(), nm_memdup_maybe_a()')
2019-05-16 11:42:16 +02:00
..
nm-c-list.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-dbus-aux.c shared: add nm_dbus_connection_signal_subscribe_name_owner_changed() helper 2019-05-12 09:56:36 +02:00
nm-dbus-aux.h shared: add nm_dbus_connection_call_start_service_by_name() helper 2019-05-12 09:56:36 +02:00
nm-dedup-multi.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-dedup-multi.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-enum-utils.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-enum-utils.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-errno.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-errno.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-glib.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-hash-utils.c shared: use union instead of _nm_alignas() for static hash-seed 2019-05-13 09:25:05 +02:00
nm-hash-utils.h shared: use union instead of _nm_alignas() for static hash-seed 2019-05-13 09:25:05 +02:00
nm-io-utils.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-io-utils.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-jansson.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-keyfile-aux.c shared: add NMKeyFileDB API 2019-05-07 16:41:21 +02:00
nm-keyfile-aux.h shared: add NMKeyFileDB API 2019-05-07 16:41:21 +02:00
nm-logging-fwd.h shared: add nm_log_level_from_syslog() helper to convert from syslog levels 2019-05-07 16:41:21 +02:00
nm-macros-internal.h shared: fix type shenanigans for data pointer of nm_memdup_maybe_a() 2019-05-16 11:42:16 +02:00
nm-obj.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-random-utils.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-random-utils.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-secret-utils.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-secret-utils.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-shared-utils.c shared: use nm_str_skip_leading_spaces() in _nm_utils_ascii_str_to_int64() 2019-05-07 20:58:17 +02:00
nm-shared-utils.h shared,libnm-core: use nm_utils_named_value_list_sort() 2019-04-25 08:53:51 +02:00
nm-time-utils.c all: fix typos (milli seconds -> milliseconds) 2019-05-08 13:35:59 +02:00
nm-time-utils.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00