diff options
| author | F. Aragon <paco@voltanet.io> | 2018-09-17 18:22:59 +0200 |
|---|---|---|
| committer | F. Aragon <paco@voltanet.io> | 2018-09-17 19:38:59 +0200 |
| commit | 36de6e0e1ea886edd0ff7f706a5e8fc81ca9d1e6 (patch) | |
| tree | 25f225b816fd7547224d54744b3631d2aa36620b /lib/if.c | |
| parent | 6efca3442f9e74c789803cbcfba330cd12de7863 (diff) | |
bgpd isisd ldpd lib: const drop fixes (SA)
Can be detected with e.g. ./configure CFLAGS=-Wcast-qual CC=clang
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -63,7 +63,7 @@ int ptm_enable = 0; * before all numbers. Examples: de0 < de1, de100 < fxp0 < xl0, devpty < * devpty0, de0 < del0 */ -int if_cmp_name_func(char *p1, char *p2) +int if_cmp_name_func(const char *p1, const char *p2) { unsigned int l1, l2; long int x1, x2; @@ -99,8 +99,8 @@ int if_cmp_name_func(char *p1, char *p2) if (!*p2) return 1; - x1 = strtol(p1, &p1, 10); - x2 = strtol(p2, &p2, 10); + x1 = strtol(p1, (char **)&p1, 10); + x2 = strtol(p2, (char **)&p2, 10); /* let's compare numbers now */ if (x1 < x2) @@ -121,7 +121,7 @@ int if_cmp_name_func(char *p1, char *p2) static int if_cmp_func(const struct interface *ifp1, const struct interface *ifp2) { - return if_cmp_name_func((char *)ifp1->name, (char *)ifp2->name); + return if_cmp_name_func(ifp1->name, ifp2->name); } static int if_cmp_index_func(const struct interface *ifp1, |
