[PATCH] sysdeps/posix/getaddrinfo.c: Avoid compiler warnings

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] sysdeps/posix/getaddrinfo.c: Avoid compiler warnings

Dmitry V. Levin
2006-10-02  Dmitry V. Levin  <[hidden email]>

        * sysdeps/posix/getaddrinfo.c (match_prefix): Make mask and val
        variables const to avoid compiler warnings.

--- glibc-2.5.orig/sysdeps/posix/getaddrinfo.c
+++ glibc-2.5/sysdeps/posix/getaddrinfo.c
@@ -1291,8 +1291,8 @@ match_prefix (const struct sockaddr_stor
   for (idx = 0; ; ++idx)
     {
       unsigned int bits = list[idx].bits;
-      uint8_t *mask = list[idx].prefix.s6_addr;
-      uint8_t *val = in6->sin6_addr.s6_addr;
+      const uint8_t *mask = list[idx].prefix.s6_addr;
+      const uint8_t *val = in6->sin6_addr.s6_addr;
 
       while (bits >= 8)
  {

--
ldv

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] sysdeps/posix/getaddrinfo.c: Avoid compiler warnings

Ulrich Drepper
Applied.

--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖


signature.asc (259 bytes) Download Attachment