Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208203
b: refs/heads/master
c: e03b984
h: refs/heads/master
i:
  208201: 586a0da
  208199: a1c3223
v: v3
  • Loading branch information
Andy Shevchenko authored and Mauro Carvalho Chehab committed Aug 9, 2010
1 parent 670c780 commit dc90941
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 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: af5458b91f99ce5a29f670379a6d7a9e69014def
refs/heads/master: e03b9843dc30ba44dedffdfa4180f0723f04e3ab
14 changes: 2 additions & 12 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ static int debugifc_parse_unsigned_number(const char *buf,unsigned int count,
u32 *num_ptr)
{
u32 result = 0;
u32 val;
int ch;
int radix = 10;
if ((count >= 2) && (buf[0] == '0') &&
((buf[1] == 'x') || (buf[1] == 'X'))) {
Expand All @@ -107,17 +105,9 @@ static int debugifc_parse_unsigned_number(const char *buf,unsigned int count,
}

while (count--) {
ch = *buf++;
if ((ch >= '0') && (ch <= '9')) {
val = ch - '0';
} else if ((ch >= 'a') && (ch <= 'f')) {
val = ch - 'a' + 10;
} else if ((ch >= 'A') && (ch <= 'F')) {
val = ch - 'A' + 10;
} else {
int val = hex_to_bin(*buf++);
if (val < 0 || val >= radix)
return -EINVAL;
}
if (val >= radix) return -EINVAL;
result *= radix;
result += val;
}
Expand Down

0 comments on commit dc90941

Please sign in to comment.