Commit 207db493 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/sparc-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents a9729d97 a4475157
......@@ -148,10 +148,10 @@ static int __set_utsfield(char __user *to, int to_size,
if (copy_to_user(to, from, len))
return -EFAULT;
off = len < to_size? len: len - 1;
if (dotchop) {
off = (strnchr(from, len, '.') - from);
} else{
off = len - 1;
const char *p = strnchr(from, len, '.');
if (p) off = p - from;
}
if (__put_user('\0', to + off))
......
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