Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134598
b: refs/heads/master
c: 54b8732
h: refs/heads/master
v: v3
  • Loading branch information
Hannes Eder authored and David S. Miller committed Feb 18, 2009
1 parent f0ec7b5 commit 9a19293
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 1f78d9f94539b8806b81057e75025f2bac7d7ccc
refs/heads/master: 54b87323eddd9b7854249f05cfd183a0ac602ab6
6 changes: 3 additions & 3 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4732,7 +4732,7 @@ static void bond_free_all(void)
*/
int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl)
{
int mode = -1, i, rv;
int modeint = -1, i, rv;
char *p, modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, };

for (p = (char *)buf; *p; p++)
Expand All @@ -4742,13 +4742,13 @@ int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl)
if (*p)
rv = sscanf(buf, "%20s", modestr);
else
rv = sscanf(buf, "%d", &mode);
rv = sscanf(buf, "%d", &modeint);

if (!rv)
return -1;

for (i = 0; tbl[i].modename; i++) {
if (mode == tbl[i].mode)
if (modeint == tbl[i].mode)
return tbl[i].mode;
if (strcmp(modestr, tbl[i].modename) == 0)
return tbl[i].mode;
Expand Down

0 comments on commit 9a19293

Please sign in to comment.