]> git.puffer.fish Git - mirror/frr.git/commitdiff
Add const to char * to quiet warnings.
authorgdt <gdt>
Thu, 9 Dec 2004 14:48:12 +0000 (14:48 +0000)
committergdt <gdt>
Thu, 9 Dec 2004 14:48:12 +0000 (14:48 +0000)
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.

zebra/ChangeLog
zebra/kernel_socket.c

index 696676bc1c908e0fb25eccbfc170f28df0d4970c..8d09f502fd5598bb9ac2034f3cb62a5315ab697a 100644 (file)
@@ -1,3 +1,7 @@
+2004-12-09  Greg Troxel  <gdt@fnord.ir.bbn.com>
+
+       * kernel_socket.c (rtmsg_debug): char * => const char *
+
 2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * *.c: Change level of debug messages to LOG_DEBUG.
index e0f2a8f2eb09a29c30430468ca11b07fc7ba0db5..9027cd6a1f43a6c611e9a73fb3e1df26ee6fba5e 100644 (file)
@@ -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++)