Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Initialize/compare pointers with NULL instead of 0.
details: https://anonhg.NetBSD.org/src/rev/523ec30535d2
branches: trunk
changeset: 749769:523ec30535d2
user: dyoung <dyoung%NetBSD.org@localhost>
date: Mon Dec 07 18:38:55 2009 +0000
description:
Initialize/compare pointers with NULL instead of 0.
diffstat:
sys/netinet/in.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (48 lines):
diff -r 0e38ffe5da65 -r 523ec30535d2 sys/netinet/in.c
--- a/sys/netinet/in.c Mon Dec 07 17:38:16 2009 +0000
+++ b/sys/netinet/in.c Mon Dec 07 18:38:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in.c,v 1.135 2009/09/11 22:06:29 dyoung Exp $ */
+/* $NetBSD: in.c,v 1.136 2009/12/07 18:38:55 dyoung Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.135 2009/09/11 22:06:29 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.136 2009/12/07 18:38:55 dyoung Exp $");
#include "opt_inet.h"
#include "opt_inet_conf.h"
@@ -310,7 +310,7 @@
struct lwp *l)
{
struct ifreq *ifr = (struct ifreq *)data;
- struct in_ifaddr *ia = 0;
+ struct in_ifaddr *ia = NULL;
struct in_aliasreq *ifra = (struct in_aliasreq *)data;
struct sockaddr_in oldaddr;
int error, hostIsNew, maskIsNew;
@@ -382,9 +382,9 @@
NULL) != 0)
return (EPERM);
- if (ia == 0) {
+ if (ia == NULL) {
ia = malloc(sizeof(*ia), M_IFADDR, M_WAITOK|M_ZERO);
- if (ia == 0)
+ if (ia == NULL)
return (ENOBUFS);
TAILQ_INSERT_TAIL(&in_ifaddrhead, ia, ia_list);
IFAREF(&ia->ia_ifa);
@@ -422,7 +422,7 @@
case SIOCGIFNETMASK:
case SIOCGIFDSTADDR:
case SIOCGIFBRDADDR:
- if (ia == 0)
+ if (ia == NULL)
return (EADDRNOTAVAIL);
break;
}
Home |
Main Index |
Thread Index |
Old Index