Use NULL, not 0, where appropriate.
return NULL;
idp->id_free = p->ary[0];
idp->id_free_cnt--;
- p->ary[0] = 0;
+ p->ary[0] = NULL;
spin_unlock(&idp->lock);
return(p);
}
*/
for (new = p; p && p != idp->top; new = p) {
p = p->ary[0];
- new->ary[0] = 0;
+ new->ary[0] = NULL;
new->bitmap = new->count = 0;
free_layer(idp, new);
}
{
if (!idr_layer_cache)
idr_layer_cache = kmem_cache_create("idr_layer_cache",
- sizeof(struct idr_layer), 0, 0, idr_cache_ctor, 0);
+ sizeof(struct idr_layer), 0, 0, idr_cache_ctor, NULL);
return 0;
}
argv [0] = hotplug_path;
argv [1] = name;
- argv [2] = 0;
+ argv [2] = NULL;
/* minimal command environment */
envp [i++] = "HOME=/";
n = root->rb_node;
if (!n)
- return 0;
+ return NULL;
while (n->rb_left)
n = n->rb_left;
return n;
if (type & LEFT)
type &= ~ZEROPAD;
if (base < 2 || base > 36)
- return 0;
+ return NULL;
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN) {
top_iph->tot_len = htons((*pskb)->len + alen);
top_iph->frag_off = iph->frag_off&htons(IP_DF);
if (!(top_iph->frag_off))
- ip_select_ident(top_iph, dst, 0);
+ ip_select_ident(top_iph, dst, NULL);
top_iph->ttl = iph->ttl; /* TTL disclosed */
top_iph->check = 0;
top_iph->saddr = x->props.saddr.a4;
unsigned long ip_ct_tcp_timeout_close = 10 SECS;
static unsigned long * tcp_timeouts[]
-= { 0, /* TCP_CONNTRACK_NONE */
+= { NULL, /* TCP_CONNTRACK_NONE */
&ip_ct_tcp_timeout_established, /* TCP_CONNTRACK_ESTABLISHED, */
&ip_ct_tcp_timeout_syn_sent, /* TCP_CONNTRACK_SYN_SENT, */
&ip_ct_tcp_timeout_syn_recv, /* TCP_CONNTRACK_SYN_RECV, */
&ip_ct_tcp_timeout_close, /* TCP_CONNTRACK_CLOSE, */
&ip_ct_tcp_timeout_close_wait, /* TCP_CONNTRACK_CLOSE_WAIT, */
&ip_ct_tcp_timeout_last_ack, /* TCP_CONNTRACK_LAST_ACK, */
- 0, /* TCP_CONNTRACK_LISTEN */
+ NULL, /* TCP_CONNTRACK_LISTEN */
};
#define sNO TCP_CONNTRACK_NONE
static void __exit ipsec_pfkey_exit(void)
{
xfrm_unregister_km(&pfkeyv2_mgr);
- remove_proc_entry("net/pfkey", 0);
+ remove_proc_entry("net/pfkey", NULL);
sock_unregister(PF_KEY);
}
{
sock_register(&pfkey_family_ops);
#ifdef CONFIG_PROC_FS
- create_proc_read_entry("net/pfkey", 0, 0, pfkey_read_proc, NULL);
+ create_proc_read_entry("net/pfkey", 0, NULL, pfkey_read_proc, NULL);
#endif
xfrm_register_km(&pfkeyv2_mgr);
return 0;
if (!svcdata)
goto auth_err;
rqstp->rq_auth_data = svcdata;
- svcdata->body_start = 0;
+ svcdata->body_start = NULL;
svcdata->rsci = NULL;
gc = &svcdata->clcred;
break;
case RPC_GSS_SVC_INTEGRITY:
p = gsd->body_start;
- gsd->body_start = 0;
+ gsd->body_start = NULL;
/* move accept_stat to right place: */
memcpy(p, p + 2, 4);
/* don't wrap in failure case: */
dprintk("RPC: unregistering /proc/net/rpc\n");
if (proc_net_rpc) {
proc_net_rpc = NULL;
- remove_proc_entry("net/rpc", 0);
+ remove_proc_entry("net/rpc", NULL);
}
}
/* allocate our sock slab cache */
unix_sk_cachep = kmem_cache_create("unix_sock",
sizeof(struct unix_sock), 0,
- SLAB_HWCACHE_ALIGN, 0, 0);
+ SLAB_HWCACHE_ALIGN, NULL, NULL);
if (!unix_sk_cachep)
printk(KERN_CRIT
"af_unix_init: Cannot create unix_sock SLAB cache!\n");