Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b3854e93
Commit
b3854e93
authored
Jun 29, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparse: get rid of more integer/pointer confusion
Use NULL, not 0, where appropriate.
parent
9ee9887b
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
15 additions
and
15 deletions
+15
-15
lib/idr.c
lib/idr.c
+3
-3
lib/kobject.c
lib/kobject.c
+1
-1
lib/rbtree.c
lib/rbtree.c
+1
-1
lib/vsprintf.c
lib/vsprintf.c
+1
-1
net/ipv4/esp4.c
net/ipv4/esp4.c
+1
-1
net/ipv4/netfilter/ip_conntrack_proto_tcp.c
net/ipv4/netfilter/ip_conntrack_proto_tcp.c
+2
-2
net/key/af_key.c
net/key/af_key.c
+2
-2
net/sunrpc/auth_gss/svcauth_gss.c
net/sunrpc/auth_gss/svcauth_gss.c
+2
-2
net/sunrpc/stats.c
net/sunrpc/stats.c
+1
-1
net/unix/af_unix.c
net/unix/af_unix.c
+1
-1
No files found.
lib/idr.c
View file @
b3854e93
...
@@ -120,7 +120,7 @@ static struct idr_layer *alloc_layer(struct idr *idp)
...
@@ -120,7 +120,7 @@ static struct idr_layer *alloc_layer(struct idr *idp)
return
NULL
;
return
NULL
;
idp
->
id_free
=
p
->
ary
[
0
];
idp
->
id_free
=
p
->
ary
[
0
];
idp
->
id_free_cnt
--
;
idp
->
id_free_cnt
--
;
p
->
ary
[
0
]
=
0
;
p
->
ary
[
0
]
=
NULL
;
spin_unlock
(
&
idp
->
lock
);
spin_unlock
(
&
idp
->
lock
);
return
(
p
);
return
(
p
);
}
}
...
@@ -251,7 +251,7 @@ static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id)
...
@@ -251,7 +251,7 @@ static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id)
*/
*/
for
(
new
=
p
;
p
&&
p
!=
idp
->
top
;
new
=
p
)
{
for
(
new
=
p
;
p
&&
p
!=
idp
->
top
;
new
=
p
)
{
p
=
p
->
ary
[
0
];
p
=
p
->
ary
[
0
];
new
->
ary
[
0
]
=
0
;
new
->
ary
[
0
]
=
NULL
;
new
->
bitmap
=
new
->
count
=
0
;
new
->
bitmap
=
new
->
count
=
0
;
free_layer
(
idp
,
new
);
free_layer
(
idp
,
new
);
}
}
...
@@ -401,7 +401,7 @@ static int init_id_cache(void)
...
@@ -401,7 +401,7 @@ static int init_id_cache(void)
{
{
if
(
!
idr_layer_cache
)
if
(
!
idr_layer_cache
)
idr_layer_cache
=
kmem_cache_create
(
"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
;
return
0
;
}
}
...
...
lib/kobject.c
View file @
b3854e93
...
@@ -145,7 +145,7 @@ static void kset_hotplug(const char *action, struct kset *kset,
...
@@ -145,7 +145,7 @@ static void kset_hotplug(const char *action, struct kset *kset,
argv
[
0
]
=
hotplug_path
;
argv
[
0
]
=
hotplug_path
;
argv
[
1
]
=
name
;
argv
[
1
]
=
name
;
argv
[
2
]
=
0
;
argv
[
2
]
=
NULL
;
/* minimal command environment */
/* minimal command environment */
envp
[
i
++
]
=
"HOME=/"
;
envp
[
i
++
]
=
"HOME=/"
;
...
...
lib/rbtree.c
View file @
b3854e93
...
@@ -305,7 +305,7 @@ struct rb_node *rb_first(struct rb_root *root)
...
@@ -305,7 +305,7 @@ struct rb_node *rb_first(struct rb_root *root)
n
=
root
->
rb_node
;
n
=
root
->
rb_node
;
if
(
!
n
)
if
(
!
n
)
return
0
;
return
NULL
;
while
(
n
->
rb_left
)
while
(
n
->
rb_left
)
n
=
n
->
rb_left
;
n
=
n
->
rb_left
;
return
n
;
return
n
;
...
...
lib/vsprintf.c
View file @
b3854e93
...
@@ -154,7 +154,7 @@ static char * number(char * buf, char * end, unsigned long long num, int base, i
...
@@ -154,7 +154,7 @@ static char * number(char * buf, char * end, unsigned long long num, int base, i
if
(
type
&
LEFT
)
if
(
type
&
LEFT
)
type
&=
~
ZEROPAD
;
type
&=
~
ZEROPAD
;
if
(
base
<
2
||
base
>
36
)
if
(
base
<
2
||
base
>
36
)
return
0
;
return
NULL
;
c
=
(
type
&
ZEROPAD
)
?
'0'
:
' '
;
c
=
(
type
&
ZEROPAD
)
?
'0'
:
' '
;
sign
=
0
;
sign
=
0
;
if
(
type
&
SIGN
)
{
if
(
type
&
SIGN
)
{
...
...
net/ipv4/esp4.c
View file @
b3854e93
...
@@ -121,7 +121,7 @@ int esp_output(struct sk_buff **pskb)
...
@@ -121,7 +121,7 @@ int esp_output(struct sk_buff **pskb)
top_iph
->
tot_len
=
htons
((
*
pskb
)
->
len
+
alen
);
top_iph
->
tot_len
=
htons
((
*
pskb
)
->
len
+
alen
);
top_iph
->
frag_off
=
iph
->
frag_off
&
htons
(
IP_DF
);
top_iph
->
frag_off
=
iph
->
frag_off
&
htons
(
IP_DF
);
if
(
!
(
top_iph
->
frag_off
))
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
->
ttl
=
iph
->
ttl
;
/* TTL disclosed */
top_iph
->
check
=
0
;
top_iph
->
check
=
0
;
top_iph
->
saddr
=
x
->
props
.
saddr
.
a4
;
top_iph
->
saddr
=
x
->
props
.
saddr
.
a4
;
...
...
net/ipv4/netfilter/ip_conntrack_proto_tcp.c
View file @
b3854e93
...
@@ -67,7 +67,7 @@ unsigned long ip_ct_tcp_timeout_time_wait = 2 MINS;
...
@@ -67,7 +67,7 @@ unsigned long ip_ct_tcp_timeout_time_wait = 2 MINS;
unsigned
long
ip_ct_tcp_timeout_close
=
10
SECS
;
unsigned
long
ip_ct_tcp_timeout_close
=
10
SECS
;
static
unsigned
long
*
tcp_timeouts
[]
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_established
,
/* TCP_CONNTRACK_ESTABLISHED, */
&
ip_ct_tcp_timeout_syn_sent
,
/* TCP_CONNTRACK_SYN_SENT, */
&
ip_ct_tcp_timeout_syn_sent
,
/* TCP_CONNTRACK_SYN_SENT, */
&
ip_ct_tcp_timeout_syn_recv
,
/* TCP_CONNTRACK_SYN_RECV, */
&
ip_ct_tcp_timeout_syn_recv
,
/* TCP_CONNTRACK_SYN_RECV, */
...
@@ -76,7 +76,7 @@ static unsigned long * tcp_timeouts[]
...
@@ -76,7 +76,7 @@ static unsigned long * tcp_timeouts[]
&
ip_ct_tcp_timeout_close
,
/* TCP_CONNTRACK_CLOSE, */
&
ip_ct_tcp_timeout_close
,
/* TCP_CONNTRACK_CLOSE, */
&
ip_ct_tcp_timeout_close_wait
,
/* TCP_CONNTRACK_CLOSE_WAIT, */
&
ip_ct_tcp_timeout_close_wait
,
/* TCP_CONNTRACK_CLOSE_WAIT, */
&
ip_ct_tcp_timeout_last_ack
,
/* TCP_CONNTRACK_LAST_ACK, */
&
ip_ct_tcp_timeout_last_ack
,
/* TCP_CONNTRACK_LAST_ACK, */
0
,
/* TCP_CONNTRACK_LISTEN */
NULL
,
/* TCP_CONNTRACK_LISTEN */
};
};
#define sNO TCP_CONNTRACK_NONE
#define sNO TCP_CONNTRACK_NONE
...
...
net/key/af_key.c
View file @
b3854e93
...
@@ -2857,7 +2857,7 @@ static struct xfrm_mgr pfkeyv2_mgr =
...
@@ -2857,7 +2857,7 @@ static struct xfrm_mgr pfkeyv2_mgr =
static
void
__exit
ipsec_pfkey_exit
(
void
)
static
void
__exit
ipsec_pfkey_exit
(
void
)
{
{
xfrm_unregister_km
(
&
pfkeyv2_mgr
);
xfrm_unregister_km
(
&
pfkeyv2_mgr
);
remove_proc_entry
(
"net/pfkey"
,
0
);
remove_proc_entry
(
"net/pfkey"
,
NULL
);
sock_unregister
(
PF_KEY
);
sock_unregister
(
PF_KEY
);
}
}
...
@@ -2865,7 +2865,7 @@ static int __init ipsec_pfkey_init(void)
...
@@ -2865,7 +2865,7 @@ static int __init ipsec_pfkey_init(void)
{
{
sock_register
(
&
pfkey_family_ops
);
sock_register
(
&
pfkey_family_ops
);
#ifdef CONFIG_PROC_FS
#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
#endif
xfrm_register_km
(
&
pfkeyv2_mgr
);
xfrm_register_km
(
&
pfkeyv2_mgr
);
return
0
;
return
0
;
...
...
net/sunrpc/auth_gss/svcauth_gss.c
View file @
b3854e93
...
@@ -763,7 +763,7 @@ svcauth_gss_accept(struct svc_rqst *rqstp, u32 *authp)
...
@@ -763,7 +763,7 @@ svcauth_gss_accept(struct svc_rqst *rqstp, u32 *authp)
if
(
!
svcdata
)
if
(
!
svcdata
)
goto
auth_err
;
goto
auth_err
;
rqstp
->
rq_auth_data
=
svcdata
;
rqstp
->
rq_auth_data
=
svcdata
;
svcdata
->
body_start
=
0
;
svcdata
->
body_start
=
NULL
;
svcdata
->
rsci
=
NULL
;
svcdata
->
rsci
=
NULL
;
gc
=
&
svcdata
->
clcred
;
gc
=
&
svcdata
->
clcred
;
...
@@ -970,7 +970,7 @@ svcauth_gss_release(struct svc_rqst *rqstp)
...
@@ -970,7 +970,7 @@ svcauth_gss_release(struct svc_rqst *rqstp)
break
;
break
;
case
RPC_GSS_SVC_INTEGRITY
:
case
RPC_GSS_SVC_INTEGRITY
:
p
=
gsd
->
body_start
;
p
=
gsd
->
body_start
;
gsd
->
body_start
=
0
;
gsd
->
body_start
=
NULL
;
/* move accept_stat to right place: */
/* move accept_stat to right place: */
memcpy
(
p
,
p
+
2
,
4
);
memcpy
(
p
,
p
+
2
,
4
);
/* don't wrap in failure case: */
/* don't wrap in failure case: */
...
...
net/sunrpc/stats.c
View file @
b3854e93
...
@@ -169,7 +169,7 @@ rpc_proc_exit(void)
...
@@ -169,7 +169,7 @@ rpc_proc_exit(void)
dprintk
(
"RPC: unregistering /proc/net/rpc
\n
"
);
dprintk
(
"RPC: unregistering /proc/net/rpc
\n
"
);
if
(
proc_net_rpc
)
{
if
(
proc_net_rpc
)
{
proc_net_rpc
=
NULL
;
proc_net_rpc
=
NULL
;
remove_proc_entry
(
"net/rpc"
,
0
);
remove_proc_entry
(
"net/rpc"
,
NULL
);
}
}
}
}
net/unix/af_unix.c
View file @
b3854e93
...
@@ -2034,7 +2034,7 @@ static int __init af_unix_init(void)
...
@@ -2034,7 +2034,7 @@ static int __init af_unix_init(void)
/* allocate our sock slab cache */
/* allocate our sock slab cache */
unix_sk_cachep
=
kmem_cache_create
(
"unix_sock"
,
unix_sk_cachep
=
kmem_cache_create
(
"unix_sock"
,
sizeof
(
struct
unix_sock
),
0
,
sizeof
(
struct
unix_sock
),
0
,
SLAB_HWCACHE_ALIGN
,
0
,
0
);
SLAB_HWCACHE_ALIGN
,
NULL
,
NULL
);
if
(
!
unix_sk_cachep
)
if
(
!
unix_sk_cachep
)
printk
(
KERN_CRIT
printk
(
KERN_CRIT
"af_unix_init: Cannot create unix_sock SLAB cache!
\n
"
);
"af_unix_init: Cannot create unix_sock SLAB cache!
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment