|
@@ -121,7 +121,7 @@ ebt_dev_check(const char *entry, const struct net_device *device)
|
|
|
return devname[i] != entry[i] && entry[i] != 1;
|
|
|
}
|
|
|
|
|
|
-#define FWINV2(bool,invflg) ((bool) ^ !!(e->invflags & invflg))
|
|
|
+#define FWINV2(bool, invflg) ((bool) ^ !!(e->invflags & invflg))
|
|
|
/* process standard matches */
|
|
|
static inline int
|
|
|
ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb,
|
|
@@ -1441,7 +1441,7 @@ static int copy_everything_to_user(struct ebt_table *t, void __user *user,
|
|
|
return -EFAULT;
|
|
|
|
|
|
if (*len != sizeof(struct ebt_replace) + entries_size +
|
|
|
- (tmp.num_counters? nentries * sizeof(struct ebt_counter): 0))
|
|
|
+ (tmp.num_counters ? nentries * sizeof(struct ebt_counter) : 0))
|
|
|
return -EINVAL;
|
|
|
|
|
|
if (tmp.nentries != nentries) {
|
|
@@ -1477,7 +1477,7 @@ static int do_ebt_set_ctl(struct sock *sk,
|
|
|
if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
|
|
|
return -EPERM;
|
|
|
|
|
|
- switch(cmd) {
|
|
|
+ switch (cmd) {
|
|
|
case EBT_SO_SET_ENTRIES:
|
|
|
ret = do_replace(net, user, len);
|
|
|
break;
|
|
@@ -1507,10 +1507,10 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
|
|
|
if (!t)
|
|
|
return ret;
|
|
|
|
|
|
- switch(cmd) {
|
|
|
+ switch (cmd) {
|
|
|
case EBT_SO_GET_INFO:
|
|
|
case EBT_SO_GET_INIT_INFO:
|
|
|
- if (*len != sizeof(struct ebt_replace)){
|
|
|
+ if (*len != sizeof(struct ebt_replace)) {
|
|
|
ret = -EINVAL;
|
|
|
mutex_unlock(&ebt_mutex);
|
|
|
break;
|
|
@@ -1525,7 +1525,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
|
|
|
tmp.valid_hooks = t->table->valid_hooks;
|
|
|
}
|
|
|
mutex_unlock(&ebt_mutex);
|
|
|
- if (copy_to_user(user, &tmp, *len) != 0){
|
|
|
+ if (copy_to_user(user, &tmp, *len) != 0) {
|
|
|
BUGPRINT("c2u Didn't work\n");
|
|
|
ret = -EFAULT;
|
|
|
break;
|