Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203693
b: refs/heads/master
c: 451e07a
h: refs/heads/master
i:
  203691: 42e5fd7
v: v3
  • Loading branch information
Andy Shevchenko authored and David S. Miller committed Jul 23, 2010
1 parent 395bb96 commit f8a2486
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 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: 882d829a23756dd827d8ed30000f73f1b035ad29
refs/heads/master: 451e07a26483f3234f1df6b1f60b949dab4e7719
36 changes: 12 additions & 24 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,18 +1434,12 @@ static ssize_t pktgen_if_write(struct file *file,
i += len;

for (*m = 0; *v && m < pkt_dev->dst_mac + 6; v++) {
if (*v >= '0' && *v <= '9') {
*m *= 16;
*m += *v - '0';
}
if (*v >= 'A' && *v <= 'F') {
*m *= 16;
*m += *v - 'A' + 10;
}
if (*v >= 'a' && *v <= 'f') {
*m *= 16;
*m += *v - 'a' + 10;
}
int value;

value = hex_to_bin(*v);
if (value >= 0)
*m = *m * 16 + value;

if (*v == ':') {
m++;
*m = 0;
Expand Down Expand Up @@ -1476,18 +1470,12 @@ static ssize_t pktgen_if_write(struct file *file,
i += len;

for (*m = 0; *v && m < pkt_dev->src_mac + 6; v++) {
if (*v >= '0' && *v <= '9') {
*m *= 16;
*m += *v - '0';
}
if (*v >= 'A' && *v <= 'F') {
*m *= 16;
*m += *v - 'A' + 10;
}
if (*v >= 'a' && *v <= 'f') {
*m *= 16;
*m += *v - 'a' + 10;
}
int value;

value = hex_to_bin(*v);
if (value >= 0)
*m = *m * 16 + value;

if (*v == ':') {
m++;
*m = 0;
Expand Down

0 comments on commit f8a2486

Please sign in to comment.