Browse code

core: use const in some ip_addr functions

Fixes various warnings (gcc-4.2) in other parts of the code.

Andrei Pelinescu-Onciul authored on 26/08/2010 19:42:54
Showing 1 changed files
... ...
@@ -365,7 +365,8 @@ static inline void sockaddr2ip_addr(struct ip_addr* ip, struct sockaddr* sa)
365 365
 
366 366
 
367 367
 /* compare 2 sockaddr_unions */
368
-static inline int su_cmp(union sockaddr_union* s1, union sockaddr_union* s2)
368
+static inline int su_cmp(const union sockaddr_union* s1,
369
+						 const union sockaddr_union* s2)
369 370
 {
370 371
 	if (s1->s.sa_family!=s2->s.sa_family) return 0;
371 372
 	switch(s1->s.sa_family){
... ...
@@ -387,7 +388,7 @@ static inline int su_cmp(union sockaddr_union* s1, union sockaddr_union* s2)
387 387
 
388 388
 
389 389
 /* gets the port number (host byte order) */
390
-static inline unsigned short su_getport(union sockaddr_union* su)
390
+static inline unsigned short su_getport(const union sockaddr_union* su)
391 391
 {
392 392
 	switch(su->s.sa_family){
393 393
 		case AF_INET: