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
nexedi
linux
Commits
187b3f7e
Commit
187b3f7e
authored
May 27, 2003
by
Steve French
Committed by
Linus Torvalds
May 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup compiler warnings generated by new gcc
parent
fc2dcf95
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
fs/cifs/cifsproto.h
fs/cifs/cifsproto.h
+1
-1
fs/cifs/connect.c
fs/cifs/connect.c
+2
-2
fs/cifs/misc.c
fs/cifs/misc.c
+4
-4
fs/cifs/netmisc.c
fs/cifs/netmisc.c
+3
-3
fs/cifs/transport.c
fs/cifs/transport.c
+1
-1
No files found.
fs/cifs/cifsproto.h
View file @
187b3f7e
...
...
@@ -49,7 +49,7 @@ extern int SendReceive(const unsigned int /* xid */ , struct cifsSesInfo *,
extern
int
checkSMBhdr
(
struct
smb_hdr
*
smb
,
__u16
mid
);
extern
int
checkSMB
(
struct
smb_hdr
*
smb
,
__u16
mid
,
int
length
);
extern
int
is_valid_oplock_break
(
struct
smb_hdr
*
smb
);
extern
int
smbCalcSize
(
struct
smb_hdr
*
ptr
);
extern
unsigned
int
smbCalcSize
(
struct
smb_hdr
*
ptr
);
extern
int
decode_negTokenInit
(
unsigned
char
*
security_blob
,
int
length
,
enum
securityEnum
*
secType
);
extern
int
map_smb_to_linux_error
(
struct
smb_hdr
*
smb
);
...
...
fs/cifs/connect.c
View file @
187b3f7e
...
...
@@ -136,8 +136,8 @@ cifs_reconnect(struct TCP_Server_Info *server)
int
cifs_demultiplex_thread
(
struct
TCP_Server_Info
*
server
)
{
int
length
,
total_read
;
unsigned
int
pdu_length
;
int
length
;
unsigned
int
pdu_length
,
total_read
;
struct
smb_hdr
*
smb_buffer
=
NULL
;
struct
msghdr
smb_msg
;
mm_segment_t
temp_fs
;
...
...
fs/cifs/misc.c
View file @
187b3f7e
...
...
@@ -274,12 +274,12 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
cFYI
(
0
,
(
"Entering checkSMB with Length: %x, smb_buf_length: %x "
,
length
,
ntohl
(
smb
->
smb_buf_length
)));
if
((
length
<
2
+
sizeof
(
struct
smb_hdr
))
if
((
(
unsigned
int
)
length
<
2
+
sizeof
(
struct
smb_hdr
))
||
(
4
+
ntohl
(
smb
->
smb_buf_length
)
>
CIFS_MAX_MSGSIZE
+
MAX_CIFS_HDR_SIZE
))
{
if
(
length
<
2
+
sizeof
(
struct
smb_hdr
))
{
if
(
(
unsigned
int
)
length
<
2
+
sizeof
(
struct
smb_hdr
))
{
cERROR
(
1
,
(
"Length less than 2 + sizeof smb_hdr "
));
if
((
length
>=
sizeof
(
struct
smb_hdr
)
-
1
)
if
((
(
unsigned
int
)
length
>=
sizeof
(
struct
smb_hdr
)
-
1
)
&&
(
smb
->
Status
.
CifsError
!=
0
))
return
0
;
/* some error cases do not return wct and bcc */
...
...
@@ -298,7 +298,7 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
return
1
;
if
((
4
+
ntohl
(
smb
->
smb_buf_length
)
!=
smbCalcSize
(
smb
))
||
(
4
+
ntohl
(
smb
->
smb_buf_length
)
!=
length
))
{
||
(
4
+
ntohl
(
smb
->
smb_buf_length
)
!=
(
unsigned
int
)
length
))
{
return
0
;
}
else
{
cERROR
(
1
,
(
"smbCalcSize %x "
,
smbCalcSize
(
smb
)));
...
...
fs/cifs/netmisc.c
View file @
187b3f7e
...
...
@@ -791,7 +791,7 @@ ntstatus_to_dos(__u32 ntstatus, __u8 * eclass, __u16 * ecode)
int
map_smb_to_linux_error
(
struct
smb_hdr
*
smb
)
{
int
i
;
unsigned
int
i
;
int
rc
=
-
EIO
;
/* if transport error smb error may not be set */
__u8
smberrclass
;
__u16
smberrcode
;
...
...
@@ -859,10 +859,10 @@ map_smb_to_linux_error(struct smb_hdr *smb)
* calculate the size of the SMB message based on the fixed header
* portion, the number of word parameters and the data portion of the message
*/
int
unsigned
int
smbCalcSize
(
struct
smb_hdr
*
ptr
)
{
return
(
sizeof
(
struct
smb_hdr
)
+
(
int
)
(
2
*
ptr
->
WordCount
)
+
return
(
sizeof
(
struct
smb_hdr
)
+
(
2
*
ptr
->
WordCount
)
+
BCC
(
ptr
));
}
...
...
fs/cifs/transport.c
View file @
187b3f7e
...
...
@@ -186,7 +186,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
int
*
pbytes_returned
,
const
int
long_op
)
{
int
rc
=
0
;
int
receive_len
;
unsigned
int
receive_len
;
long
timeout
;
struct
mid_q_entry
*
midQ
;
...
...
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