Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218391
b: refs/heads/master
c: d618222
h: refs/heads/master
i:
  218389: b44c066
  218387: 39984b5
  218383: 03c17f8
v: v3
  • Loading branch information
Paul Gortmaker authored and David S. Miller committed Oct 24, 2010
1 parent 4532b59 commit ee6949d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 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: 38df7a39492d52f4fad484f611f01a01bd8f1e41
refs/heads/master: d618222352ac95ff9a21f1fc1018fffeb8952194
30 changes: 15 additions & 15 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,10 @@ static int count_trail_chars(const char __user * user_buffer,
static unsigned long num_arg(const char __user * user_buffer,
unsigned long maxlen, unsigned long *num)
{
int i = 0;
int i;
*num = 0;

for (; i < maxlen; i++) {
for (i = 0; i < maxlen; i++) {
char c;
if (get_user(c, &user_buffer[i]))
return -EFAULT;
Expand All @@ -789,9 +789,9 @@ static unsigned long num_arg(const char __user * user_buffer,

static int strn_len(const char __user * user_buffer, unsigned int maxlen)
{
int i = 0;
int i;

for (; i < maxlen; i++) {
for (i = 0; i < maxlen; i++) {
char c;
if (get_user(c, &user_buffer[i]))
return -EFAULT;
Expand Down Expand Up @@ -846,7 +846,7 @@ static ssize_t pktgen_if_write(struct file *file,
{
struct seq_file *seq = file->private_data;
struct pktgen_dev *pkt_dev = seq->private;
int i = 0, max, len;
int i, max, len;
char name[16], valstr[32];
unsigned long value = 0;
char *pg_result = NULL;
Expand All @@ -860,13 +860,13 @@ static ssize_t pktgen_if_write(struct file *file,
return -EINVAL;
}

max = count - i;
tmp = count_trail_chars(&user_buffer[i], max);
max = count;
tmp = count_trail_chars(user_buffer, max);
if (tmp < 0) {
pr_warning("illegal format\n");
return tmp;
}
i += tmp;
i = tmp;

/* Read variable name */

Expand Down Expand Up @@ -1764,7 +1764,7 @@ static ssize_t pktgen_thread_write(struct file *file,
{
struct seq_file *seq = file->private_data;
struct pktgen_thread *t = seq->private;
int i = 0, max, len, ret;
int i, max, len, ret;
char name[40];
char *pg_result;

Expand All @@ -1773,12 +1773,12 @@ static ssize_t pktgen_thread_write(struct file *file,
return -EINVAL;
}

max = count - i;
len = count_trail_chars(&user_buffer[i], max);
max = count;
len = count_trail_chars(user_buffer, max);
if (len < 0)
return len;

i += len;
i = len;

/* Read variable name */

Expand Down Expand Up @@ -1975,7 +1975,7 @@ static struct net_device *pktgen_dev_get_by_name(struct pktgen_dev *pkt_dev,
const char *ifname)
{
char b[IFNAMSIZ+5];
int i = 0;
int i;

for (i = 0; ifname[i] != '@'; i++) {
if (i == IFNAMSIZ)
Expand Down Expand Up @@ -2519,8 +2519,8 @@ static void free_SAs(struct pktgen_dev *pkt_dev)
{
if (pkt_dev->cflows) {
/* let go of the SAs if we have them */
int i = 0;
for (; i < pkt_dev->cflows; i++) {
int i;
for (i = 0; i < pkt_dev->cflows; i++) {
struct xfrm_state *x = pkt_dev->flows[i].x;
if (x) {
xfrm_state_put(x);
Expand Down

0 comments on commit ee6949d

Please sign in to comment.