Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198308
b: refs/heads/master
c: 69e4469
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Linus Torvalds committed May 25, 2010
1 parent 9819c30 commit c3ace52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 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: 96b89f323d6af996a7f6bd84d2119cbf7145f9a4
refs/heads/master: 69e4469a39b67e9923731d5d77d45c04837d5def
9 changes: 3 additions & 6 deletions trunk/kernel/sysctl_binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/file.h>
#include <linux/ctype.h>
#include <linux/netdevice.h>
#include <linux/kernel.h>
#include <linux/slab.h>

#ifdef CONFIG_SYSCTL_SYSCALL
Expand Down Expand Up @@ -1124,11 +1125,6 @@ static ssize_t bin_ulongvec(struct file *file,
return result;
}

static unsigned hex_value(int ch)
{
return isdigit(ch) ? ch - '0' : ((ch | 0x20) - 'a') + 10;
}

static ssize_t bin_uuid(struct file *file,
void __user *oldval, size_t oldlen, void __user *newval, size_t newlen)
{
Expand Down Expand Up @@ -1156,7 +1152,8 @@ static ssize_t bin_uuid(struct file *file,
if (!isxdigit(str[0]) || !isxdigit(str[1]))
goto out;

uuid[i] = (hex_value(str[0]) << 4) | hex_value(str[1]);
uuid[i] = (hex_to_bin(str[0]) << 4) |
hex_to_bin(str[1]);
str += 2;
if (*str == '-')
str++;
Expand Down

0 comments on commit c3ace52

Please sign in to comment.