platform: declare nmp_utils_ip_config_source_*() functions as const
This commit is contained in:
@@ -457,11 +457,8 @@ nmp_utils_ip_config_source_coerce_to_rtprot (NMIPConfigSource source)
|
||||
if (source <= NM_IP_CONFIG_SOURCE_UNKNOWN)
|
||||
return RTPROT_UNSPEC;
|
||||
|
||||
if (source <= _NM_IP_CONFIG_SOURCE_RTPROT_LAST) {
|
||||
nm_assert (NM_IS_IP_CONFIG_SOURCE_RTPROT (source));
|
||||
if (source <= _NM_IP_CONFIG_SOURCE_RTPROT_LAST)
|
||||
return source - 1;
|
||||
} else
|
||||
nm_assert (!NM_IS_IP_CONFIG_SOURCE_RTPROT (source));
|
||||
|
||||
switch (source) {
|
||||
case NM_IP_CONFIG_SOURCE_KERNEL:
|
||||
|
@@ -54,10 +54,10 @@ const char *nmp_utils_udev_get_driver (GUdevDevice *device);
|
||||
|
||||
gboolean nmp_utils_device_exists (const char *name);
|
||||
|
||||
NMIPConfigSource nmp_utils_ip_config_source_from_rtprot (guint8 rtprot);
|
||||
guint8 nmp_utils_ip_config_source_coerce_to_rtprot (NMIPConfigSource source);
|
||||
NMIPConfigSource nmp_utils_ip_config_source_coerce_from_rtprot (NMIPConfigSource source);
|
||||
NMIPConfigSource nmp_utils_ip_config_source_round_trip_rtprot (NMIPConfigSource source);
|
||||
NMIPConfigSource nmp_utils_ip_config_source_from_rtprot (guint8 rtprot) _nm_const;
|
||||
guint8 nmp_utils_ip_config_source_coerce_to_rtprot (NMIPConfigSource source) _nm_const;
|
||||
NMIPConfigSource nmp_utils_ip_config_source_coerce_from_rtprot (NMIPConfigSource source) _nm_const;
|
||||
NMIPConfigSource nmp_utils_ip_config_source_round_trip_rtprot (NMIPConfigSource source) _nm_const;
|
||||
const char * nmp_utils_ip_config_source_to_string (NMIPConfigSource source, char *buf, gsize len);
|
||||
|
||||
#endif /* __NM_PLATFORM_UTILS_H__ */
|
||||
|
Reference in New Issue
Block a user