This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>

	* 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

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]