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
d1adec97
Commit
d1adec97
authored
Jul 11, 2004
by
Steve French
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up NULL vs. 0 warnings generated by sparse tool
parent
c3547150
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
27 deletions
+27
-27
fs/cifs/asn1.c
fs/cifs/asn1.c
+1
-1
fs/cifs/cifs_debug.c
fs/cifs/cifs_debug.c
+12
-12
fs/cifs/cifs_uniupr.h
fs/cifs/cifs_uniupr.h
+1
-1
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+3
-3
fs/cifs/connect.c
fs/cifs/connect.c
+5
-5
fs/cifs/file.c
fs/cifs/file.c
+4
-4
fs/cifs/misc.c
fs/cifs/misc.c
+1
-1
No files found.
fs/cifs/asn1.c
View file @
d1adec97
...
@@ -201,7 +201,7 @@ asn1_header_decode(struct asn1_ctx *ctx,
...
@@ -201,7 +201,7 @@ asn1_header_decode(struct asn1_ctx *ctx,
if
(
def
)
if
(
def
)
*
eoc
=
ctx
->
pointer
+
len
;
*
eoc
=
ctx
->
pointer
+
len
;
else
else
*
eoc
=
0
;
*
eoc
=
NULL
;
return
1
;
return
1
;
}
}
...
...
fs/cifs/cifs_debug.c
View file @
d1adec97
...
@@ -313,65 +313,65 @@ cifs_proc_init(void)
...
@@ -313,65 +313,65 @@ cifs_proc_init(void)
proc_fs_cifs
->
owner
=
THIS_MODULE
;
proc_fs_cifs
->
owner
=
THIS_MODULE
;
create_proc_read_entry
(
"DebugData"
,
0
,
proc_fs_cifs
,
create_proc_read_entry
(
"DebugData"
,
0
,
proc_fs_cifs
,
cifs_debug_data_read
,
0
);
cifs_debug_data_read
,
NULL
);
#ifdef CONFIG_CIFS_STATS
#ifdef CONFIG_CIFS_STATS
create_proc_read_entry
(
"Stats"
,
0
,
proc_fs_cifs
,
create_proc_read_entry
(
"Stats"
,
0
,
proc_fs_cifs
,
cifs_stats_read
,
0
);
cifs_stats_read
,
NULL
);
#endif
#endif
pde
=
create_proc_read_entry
(
"cifsFYI"
,
0
,
proc_fs_cifs
,
pde
=
create_proc_read_entry
(
"cifsFYI"
,
0
,
proc_fs_cifs
,
cifsFYI_read
,
0
);
cifsFYI_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
cifsFYI_write
;
pde
->
write_proc
=
cifsFYI_write
;
pde
=
pde
=
create_proc_read_entry
(
"traceSMB"
,
0
,
proc_fs_cifs
,
create_proc_read_entry
(
"traceSMB"
,
0
,
proc_fs_cifs
,
traceSMB_read
,
0
);
traceSMB_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
traceSMB_write
;
pde
->
write_proc
=
traceSMB_write
;
pde
=
create_proc_read_entry
(
"OplockEnabled"
,
0
,
proc_fs_cifs
,
pde
=
create_proc_read_entry
(
"OplockEnabled"
,
0
,
proc_fs_cifs
,
oplockEnabled_read
,
0
);
oplockEnabled_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
oplockEnabled_write
;
pde
->
write_proc
=
oplockEnabled_write
;
pde
=
create_proc_read_entry
(
"QuotaEnabled"
,
0
,
proc_fs_cifs
,
pde
=
create_proc_read_entry
(
"QuotaEnabled"
,
0
,
proc_fs_cifs
,
quotaEnabled_read
,
0
);
quotaEnabled_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
quotaEnabled_write
;
pde
->
write_proc
=
quotaEnabled_write
;
pde
=
create_proc_read_entry
(
"LinuxExtensionsEnabled"
,
0
,
proc_fs_cifs
,
pde
=
create_proc_read_entry
(
"LinuxExtensionsEnabled"
,
0
,
proc_fs_cifs
,
linuxExtensionsEnabled_read
,
0
);
linuxExtensionsEnabled_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
linuxExtensionsEnabled_write
;
pde
->
write_proc
=
linuxExtensionsEnabled_write
;
pde
=
pde
=
create_proc_read_entry
(
"MultiuserMount"
,
0
,
proc_fs_cifs
,
create_proc_read_entry
(
"MultiuserMount"
,
0
,
proc_fs_cifs
,
multiuser_mount_read
,
0
);
multiuser_mount_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
multiuser_mount_write
;
pde
->
write_proc
=
multiuser_mount_write
;
pde
=
pde
=
create_proc_read_entry
(
"ExtendedSecurity"
,
0
,
proc_fs_cifs
,
create_proc_read_entry
(
"ExtendedSecurity"
,
0
,
proc_fs_cifs
,
extended_security_read
,
0
);
extended_security_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
extended_security_write
;
pde
->
write_proc
=
extended_security_write
;
pde
=
pde
=
create_proc_read_entry
(
"LookupCacheEnabled"
,
0
,
proc_fs_cifs
,
create_proc_read_entry
(
"LookupCacheEnabled"
,
0
,
proc_fs_cifs
,
lookupFlag_read
,
0
);
lookupFlag_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
lookupFlag_write
;
pde
->
write_proc
=
lookupFlag_write
;
pde
=
pde
=
create_proc_read_entry
(
"NTLMV2Enabled"
,
0
,
proc_fs_cifs
,
create_proc_read_entry
(
"NTLMV2Enabled"
,
0
,
proc_fs_cifs
,
ntlmv2_enabled_read
,
0
);
ntlmv2_enabled_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
ntlmv2_enabled_write
;
pde
->
write_proc
=
ntlmv2_enabled_write
;
pde
=
pde
=
create_proc_read_entry
(
"PacketSigningEnabled"
,
0
,
proc_fs_cifs
,
create_proc_read_entry
(
"PacketSigningEnabled"
,
0
,
proc_fs_cifs
,
packet_signing_enabled_read
,
0
);
packet_signing_enabled_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
packet_signing_enabled_write
;
pde
->
write_proc
=
packet_signing_enabled_write
;
}
}
...
...
fs/cifs/cifs_uniupr.h
View file @
d1adec97
...
@@ -132,7 +132,7 @@ const struct UniCaseRange CifsUniUpperRange[] = {
...
@@ -132,7 +132,7 @@ const struct UniCaseRange CifsUniUpperRange[] = {
{
0x0490
,
0x04cc
,
UniCaseRangeU0490
},
{
0x0490
,
0x04cc
,
UniCaseRangeU0490
},
{
0x1e00
,
0x1ffc
,
UniCaseRangeU1e00
},
{
0x1e00
,
0x1ffc
,
UniCaseRangeU1e00
},
{
0xff40
,
0xff5a
,
UniCaseRangeUff40
},
{
0xff40
,
0xff5a
,
UniCaseRangeUff40
},
{
0
,
0
,
0
}
{
0
,
0
,
NULL
}
};
};
#endif
#endif
...
...
fs/cifs/cifssmb.c
View file @
d1adec97
...
@@ -190,7 +190,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
...
@@ -190,7 +190,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
rc
=
-
EIO
;
rc
=
-
EIO
;
return
rc
;
return
rc
;
}
}
rc
=
smb_init
(
SMB_COM_NEGOTIATE
,
0
,
0
/* no tcon yet */
,
rc
=
smb_init
(
SMB_COM_NEGOTIATE
,
0
,
NULL
/* no tcon yet */
,
(
void
**
)
&
pSMB
,
(
void
**
)
&
pSMBr
);
(
void
**
)
&
pSMB
,
(
void
**
)
&
pSMBr
);
if
(
rc
)
if
(
rc
)
return
rc
;
return
rc
;
...
@@ -363,7 +363,7 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses)
...
@@ -363,7 +363,7 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses)
return
-
EBUSY
;
return
-
EBUSY
;
}
}
rc
=
smb_init
(
SMB_COM_LOGOFF_ANDX
,
2
,
0
/* no tcon anymore */
,
rc
=
smb_init
(
SMB_COM_LOGOFF_ANDX
,
2
,
NULL
/* no tcon anymore */
,
(
void
**
)
&
pSMB
,
(
void
**
)
&
smb_buffer_response
);
(
void
**
)
&
pSMB
,
(
void
**
)
&
smb_buffer_response
);
if
(
ses
->
server
->
secMode
&
(
SECMODE_SIGN_REQUIRED
|
SECMODE_SIGN_ENABLED
))
if
(
ses
->
server
->
secMode
&
(
SECMODE_SIGN_REQUIRED
|
SECMODE_SIGN_ENABLED
))
...
@@ -2067,7 +2067,7 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
...
@@ -2067,7 +2067,7 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
if
(
ses
==
NULL
)
if
(
ses
==
NULL
)
return
-
ENODEV
;
return
-
ENODEV
;
getDFSRetry:
getDFSRetry:
rc
=
smb_init
(
SMB_COM_TRANSACTION2
,
15
,
0
,
(
void
**
)
&
pSMB
,
rc
=
smb_init
(
SMB_COM_TRANSACTION2
,
15
,
NULL
,
(
void
**
)
&
pSMB
,
(
void
**
)
&
pSMBr
);
(
void
**
)
&
pSMBr
);
if
(
rc
)
if
(
rc
)
return
rc
;
return
rc
;
...
...
fs/cifs/connect.c
View file @
d1adec97
...
@@ -1443,7 +1443,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses,
...
@@ -1443,7 +1443,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses,
/* send SMBsessionSetup here */
/* send SMBsessionSetup here */
header_assemble
(
smb_buffer
,
SMB_COM_SESSION_SETUP_ANDX
,
header_assemble
(
smb_buffer
,
SMB_COM_SESSION_SETUP_ANDX
,
0
/* no tCon exists yet */
,
13
/* wct */
);
NULL
/* no tCon exists yet */
,
13
/* wct */
);
pSMB
->
req_no_secext
.
AndXCommand
=
0xFF
;
pSMB
->
req_no_secext
.
AndXCommand
=
0xFF
;
pSMB
->
req_no_secext
.
MaxBufferSize
=
cpu_to_le16
(
ses
->
server
->
maxBuf
);
pSMB
->
req_no_secext
.
MaxBufferSize
=
cpu_to_le16
(
ses
->
server
->
maxBuf
);
...
@@ -1699,7 +1699,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses,
...
@@ -1699,7 +1699,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses,
/* send SMBsessionSetup here */
/* send SMBsessionSetup here */
header_assemble
(
smb_buffer
,
SMB_COM_SESSION_SETUP_ANDX
,
header_assemble
(
smb_buffer
,
SMB_COM_SESSION_SETUP_ANDX
,
0
/* no tCon exists yet */
,
12
/* wct */
);
NULL
/* no tCon exists yet */
,
12
/* wct */
);
pSMB
->
req
.
hdr
.
Flags2
|=
SMBFLG2_EXT_SEC
;
pSMB
->
req
.
hdr
.
Flags2
|=
SMBFLG2_EXT_SEC
;
pSMB
->
req
.
AndXCommand
=
0xFF
;
pSMB
->
req
.
AndXCommand
=
0xFF
;
pSMB
->
req
.
MaxBufferSize
=
cpu_to_le16
(
ses
->
server
->
maxBuf
);
pSMB
->
req
.
MaxBufferSize
=
cpu_to_le16
(
ses
->
server
->
maxBuf
);
...
@@ -1961,7 +1961,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
...
@@ -1961,7 +1961,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
/* send SMBsessionSetup here */
/* send SMBsessionSetup here */
header_assemble
(
smb_buffer
,
SMB_COM_SESSION_SETUP_ANDX
,
header_assemble
(
smb_buffer
,
SMB_COM_SESSION_SETUP_ANDX
,
0
/* no tCon exists yet */
,
12
/* wct */
);
NULL
/* no tCon exists yet */
,
12
/* wct */
);
pSMB
->
req
.
hdr
.
Flags2
|=
SMBFLG2_EXT_SEC
;
pSMB
->
req
.
hdr
.
Flags2
|=
SMBFLG2_EXT_SEC
;
pSMB
->
req
.
hdr
.
Flags
|=
(
SMBFLG_CASELESS
|
SMBFLG_CANONICAL_PATH_FORMAT
);
pSMB
->
req
.
hdr
.
Flags
|=
(
SMBFLG_CASELESS
|
SMBFLG_CANONICAL_PATH_FORMAT
);
...
@@ -2301,7 +2301,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
...
@@ -2301,7 +2301,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
/* send SMBsessionSetup here */
/* send SMBsessionSetup here */
header_assemble
(
smb_buffer
,
SMB_COM_SESSION_SETUP_ANDX
,
header_assemble
(
smb_buffer
,
SMB_COM_SESSION_SETUP_ANDX
,
0
/* no tCon exists yet */
,
12
/* wct */
);
NULL
/* no tCon exists yet */
,
12
/* wct */
);
pSMB
->
req
.
hdr
.
Flags
|=
(
SMBFLG_CASELESS
|
SMBFLG_CANONICAL_PATH_FORMAT
);
pSMB
->
req
.
hdr
.
Flags
|=
(
SMBFLG_CASELESS
|
SMBFLG_CANONICAL_PATH_FORMAT
);
pSMB
->
req
.
hdr
.
Flags2
|=
SMBFLG2_EXT_SEC
;
pSMB
->
req
.
hdr
.
Flags2
|=
SMBFLG2_EXT_SEC
;
pSMB
->
req
.
AndXCommand
=
0xFF
;
pSMB
->
req
.
AndXCommand
=
0xFF
;
...
@@ -2674,7 +2674,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
...
@@ -2674,7 +2674,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
smb_buffer_response
=
smb_buffer
;
smb_buffer_response
=
smb_buffer
;
header_assemble
(
smb_buffer
,
SMB_COM_TREE_CONNECT_ANDX
,
header_assemble
(
smb_buffer
,
SMB_COM_TREE_CONNECT_ANDX
,
0
/*no tid */
,
4
/*wct */
);
NULL
/*no tid */
,
4
/*wct */
);
smb_buffer
->
Uid
=
ses
->
Suid
;
smb_buffer
->
Uid
=
ses
->
Suid
;
pSMB
=
(
TCONX_REQ
*
)
smb_buffer
;
pSMB
=
(
TCONX_REQ
*
)
smb_buffer
;
pSMBr
=
(
TCONX_RSP
*
)
smb_buffer_response
;
pSMBr
=
(
TCONX_RSP
*
)
smb_buffer_response
;
...
...
fs/cifs/file.c
View file @
d1adec97
...
@@ -1105,7 +1105,7 @@ cifs_readpages(struct file *file, struct address_space *mapping,
...
@@ -1105,7 +1105,7 @@ cifs_readpages(struct file *file, struct address_space *mapping,
struct
cifsTconInfo
*
pTcon
;
struct
cifsTconInfo
*
pTcon
;
int
bytes_read
=
0
;
int
bytes_read
=
0
;
unsigned
int
read_size
,
i
;
unsigned
int
read_size
,
i
;
char
*
smb_read_data
=
0
;
char
*
smb_read_data
=
NULL
;
struct
smb_com_read_rsp
*
pSMBr
;
struct
smb_com_read_rsp
*
pSMBr
;
struct
pagevec
lru_pvec
;
struct
pagevec
lru_pvec
;
struct
cifsFileInfo
*
open_file
;
struct
cifsFileInfo
*
open_file
;
...
@@ -1170,7 +1170,7 @@ cifs_readpages(struct file *file, struct address_space *mapping,
...
@@ -1170,7 +1170,7 @@ cifs_readpages(struct file *file, struct address_space *mapping,
if
(
rc
==
-
EAGAIN
)
{
if
(
rc
==
-
EAGAIN
)
{
if
(
smb_read_data
)
{
if
(
smb_read_data
)
{
cifs_buf_release
(
smb_read_data
);
cifs_buf_release
(
smb_read_data
);
smb_read_data
=
0
;
smb_read_data
=
NULL
;
}
}
}
}
}
}
...
@@ -1224,7 +1224,7 @@ cifs_readpages(struct file *file, struct address_space *mapping,
...
@@ -1224,7 +1224,7 @@ cifs_readpages(struct file *file, struct address_space *mapping,
}
}
if
(
smb_read_data
)
{
if
(
smb_read_data
)
{
cifs_buf_release
(
smb_read_data
);
cifs_buf_release
(
smb_read_data
);
smb_read_data
=
0
;
smb_read_data
=
NULL
;
}
}
bytes_read
=
0
;
bytes_read
=
0
;
}
}
...
@@ -1234,7 +1234,7 @@ cifs_readpages(struct file *file, struct address_space *mapping,
...
@@ -1234,7 +1234,7 @@ cifs_readpages(struct file *file, struct address_space *mapping,
/* need to free smb_read_data buf before exit */
/* need to free smb_read_data buf before exit */
if
(
smb_read_data
)
{
if
(
smb_read_data
)
{
cifs_buf_release
(
smb_read_data
);
cifs_buf_release
(
smb_read_data
);
smb_read_data
=
0
;
smb_read_data
=
NULL
;
}
}
FreeXid
(
xid
);
FreeXid
(
xid
);
...
...
fs/cifs/misc.c
View file @
d1adec97
...
@@ -150,7 +150,7 @@ tconInfoFree(struct cifsTconInfo *buf_to_free)
...
@@ -150,7 +150,7 @@ tconInfoFree(struct cifsTconInfo *buf_to_free)
struct
smb_hdr
*
struct
smb_hdr
*
cifs_buf_get
(
void
)
cifs_buf_get
(
void
)
{
{
struct
smb_hdr
*
ret_buf
=
0
;
struct
smb_hdr
*
ret_buf
=
NULL
;
/* We could use negotiated size instead of max_msgsize -
/* We could use negotiated size instead of max_msgsize -
but it may be more efficient to always alloc same size
but it may be more efficient to always alloc same size
...
...
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