platform: declare nmp_utils_ip_config_source_*() functions as const

This commit is contained in:
Thomas Haller
2016-05-16 13:16:49 +02:00
parent 5847e70fd6
commit f8fb670c6f
2 changed files with 5 additions and 8 deletions

View File

@@ -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: