summaryrefslogtreecommitdiff
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorgdt <gdt>2004-12-09 14:48:12 +0000
committergdt <gdt>2004-12-09 14:48:12 +0000
commit6a250b099fe25627e32e5ca58f5677ba5227f816 (patch)
tree998ee0b7b54991d5914350848466ab038e8fc4bf /zebra/kernel_socket.c
parent1686f93fcad703c3cb5b8d4aa5be3c62b5e966bb (diff)
Add const to char * to quiet warnings.
Note two warnings in comments. The serious one is that struct interface->ifindex probably needs to be signed, ssince we store and compare to -1.
Diffstat (limited to 'zebra/kernel_socket.c')
-rw-r--r--zebra/kernel_socket.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index e0f2a8f2..9027cd6a 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -276,6 +276,7 @@ ifm_read (struct if_msghdr *ifm)
sdl = (struct sockaddr_dl *)cp;
break;
}
+ /* XXX warning: pointer of type `void *' used in arithmetic */
cp += SAROUNDUP(cp);
}
}
@@ -324,6 +325,10 @@ ifm_read (struct if_msghdr *ifm)
* If ifp does not exist or has an invalid index (-1), create or
* fill in an interface.
*/
+ /*
+ * XXX warning: comparison between signed and unsigned
+ * ifindex should probably be signed
+ */
if ((ifp == NULL) || (ifp->ifindex == -1))
{
/*
@@ -812,7 +817,7 @@ rtm_write (int message,
static void
rtmsg_debug (struct rt_msghdr *rtm)
{
- char *type = "Unknown";
+ const char *type = "Unknown";
struct message *mes;
for (mes = rtm_type_str; mes->str; mes++)