diff options
author | Thomas Haller <thaller@redhat.com> | 2016-05-11 18:50:10 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-05-12 10:20:22 +0200 |
commit | 7aac2c8a1032519d6437f986527c3c8fca9075b2 (patch) | |
tree | 666ccf116f20d4bb6e3498e2d9521c4cc77cb75c /libnm | |
parent | ee2922827721bd8f4ea183e948f450e4f025a853 (diff) | |
download | NetworkManager-7aac2c8a1032519d6437f986527c3c8fca9075b2.tar.gz |
core: preserve const-ness in NM_IP4_CONFIG_GET_PRIVATE()
Usually, our _GET_PRIVATE() macros cast away the const-ness of
the self argument -- also because they cannot do any better in
plain (gcc) C.
Now it is possible to preserve const-ness, it seems more correct to do so.
After all, the const should also help us not modifying arguments that are
not intended to be modified.
Although, the more important use of const is to signal that a function
promises not to modify an argument, like in memcpy(void*,const void*)
it's immediately clear which is source and destination. In C, a const
is anyway not enforcable, but can show intent.
Likewise for NM_IP6_CONFIG_GET_PRIVATE() and NMIP6Config.
Diffstat (limited to 'libnm')
0 files changed, 0 insertions, 0 deletions