Commit 1ade820c authored by Mika Kukkonen's avatar Mika Kukkonen Committed by Linus Torvalds

[PATCH] Fix 'unsigned' < 0 checks

Using "-W" found a few places that should probably use signed
variables since they can contain (and check for) negative error
values.
parent 7b1eb3e7
......@@ -443,7 +443,8 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
struct timeval tm;
} v;
unsigned int lv=sizeof(int),len;
unsigned int lv = sizeof(int);
int len;
if(get_user(len,optlen))
return -EFAULT;
......
......@@ -1792,7 +1792,8 @@ static inline void flush_unauthorized_files(struct files_struct * files)
spin_lock(&files->file_lock);
for (;;) {
unsigned long set, i, fd;
unsigned long set, i;
int fd;
j++;
i = j * __NFDBITS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment