projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[NETFILTER]: Remove redundant parentheses/braces
[deliverable/linux.git]
/
net
/
netfilter
/
xt_connmark.c
diff --git
a/net/netfilter/xt_connmark.c
b/net/netfilter/xt_connmark.c
index e1803256c7924d45bba87ddd0209c51a2989ca9b..3a6e16d4edcdf27387324cb7dc3cfa84e62bd8b9 100644
(file)
--- a/
net/netfilter/xt_connmark.c
+++ b/
net/netfilter/xt_connmark.c
@@
-30,7
+30,7
@@
MODULE_DESCRIPTION("IP tables connmark match module");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_connmark");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_connmark");
-static
int
+static
bool
match(const struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
match(const struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
@@
-38,38
+38,38
@@
match(const struct sk_buff *skb,
const void *matchinfo,
int offset,
unsigned int protoff,
const void *matchinfo,
int offset,
unsigned int protoff,
-
int
*hotdrop)
+
bool
*hotdrop)
{
const struct xt_connmark_info *info = matchinfo;
{
const struct xt_connmark_info *info = matchinfo;
- struct nf_conn *ct;
+
const
struct nf_conn *ct;
enum ip_conntrack_info ctinfo;
ct = nf_ct_get(skb, &ctinfo);
if (!ct)
enum ip_conntrack_info ctinfo;
ct = nf_ct_get(skb, &ctinfo);
if (!ct)
- return
0
;
+ return
false
;
- return ((
(ct->mark)
& info->mask) == info->mark) ^ info->invert;
+ return ((
ct->mark
& info->mask) == info->mark) ^ info->invert;
}
}
-static
int
+static
bool
checkentry(const char *tablename,
const void *ip,
const struct xt_match *match,
void *matchinfo,
unsigned int hook_mask)
{
checkentry(const char *tablename,
const void *ip,
const struct xt_match *match,
void *matchinfo,
unsigned int hook_mask)
{
- struct xt_connmark_info *cm = matchinfo;
+
const
struct xt_connmark_info *cm = matchinfo;
if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) {
printk(KERN_WARNING "connmark: only support 32bit mark\n");
if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) {
printk(KERN_WARNING "connmark: only support 32bit mark\n");
- return
0
;
+ return
false
;
}
if (nf_ct_l3proto_try_module_get(match->family) < 0) {
printk(KERN_WARNING "can't load conntrack support for "
"proto=%d\n", match->family);
}
if (nf_ct_l3proto_try_module_get(match->family) < 0) {
printk(KERN_WARNING "can't load conntrack support for "
"proto=%d\n", match->family);
- return
0
;
+ return
false
;
}
}
- return
1
;
+ return
true
;
}
static void
}
static void
@@
-88,7
+88,7
@@
struct compat_xt_connmark_info {
static void compat_from_user(void *dst, void *src)
{
static void compat_from_user(void *dst, void *src)
{
- struct compat_xt_connmark_info *cm = src;
+
const
struct compat_xt_connmark_info *cm = src;
struct xt_connmark_info m = {
.mark = cm->mark,
.mask = cm->mask,
struct xt_connmark_info m = {
.mark = cm->mark,
.mask = cm->mask,
@@
-99,7
+99,7
@@
static void compat_from_user(void *dst, void *src)
static int compat_to_user(void __user *dst, void *src)
{
static int compat_to_user(void __user *dst, void *src)
{
- struct xt_connmark_info *m = src;
+
const
struct xt_connmark_info *m = src;
struct compat_xt_connmark_info cm = {
.mark = m->mark,
.mask = m->mask,
struct compat_xt_connmark_info cm = {
.mark = m->mark,
.mask = m->mask,
This page took
0.041799 seconds
and
5
git commands to generate.