Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299266
b: refs/heads/master
c: 12e993b
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Apr 16, 2012
1 parent 663909d commit 790fd44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ebfc5b802fa76baeb4371311ff9fc27a2258d90d
refs/heads/master: 12e993b89464707398e4209bd99983e376454985
4 changes: 2 additions & 2 deletions trunk/arch/x86/lib/usercopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static inline unsigned long count_bytes(unsigned long mask)
* hit it), 'max' is the address space maximum (and we return
* -EFAULT if we hit it).
*/
static inline long do_strncpy_from_user(char *dst, const char __user *src, long count, long max)
static inline long do_strncpy_from_user(char *dst, const char __user *src, long count, unsigned long max)
{
long res = 0;

Expand Down Expand Up @@ -100,7 +100,7 @@ static inline long do_strncpy_from_user(char *dst, const char __user *src, long
* too? If so, that's ok - we got as much as the user asked for.
*/
if (res >= count)
return count;
return res;

/*
* Nope: we hit the address space limit, and we still had more
Expand Down

0 comments on commit 790fd44

Please sign in to comment.