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
/
ipv4
/
netfilter
/
ipt_ULOG.c
diff --git
a/net/ipv4/netfilter/ipt_ULOG.c
b/net/ipv4/netfilter/ipt_ULOG.c
index 23b607b33b32acdceddb9ae40541eee0406fa477..5b25ca688784bec4a6821edd6efbedf52472ee99 100644
(file)
--- a/
net/ipv4/netfilter/ipt_ULOG.c
+++ b/
net/ipv4/netfilter/ipt_ULOG.c
@@
-179,12
+179,10
@@
static void ipt_ulog_packet(unsigned int hooknum,
unsigned int groupnum = ffs(loginfo->nl_group) - 1;
/* calculate the size of the skb needed */
unsigned int groupnum = ffs(loginfo->nl_group) - 1;
/* calculate the size of the skb needed */
- if ((loginfo->copy_range == 0) ||
- (loginfo->copy_range > skb->len)) {
+ if (loginfo->copy_range == 0 || loginfo->copy_range > skb->len)
copy_len = skb->len;
copy_len = skb->len;
- } else {
+ else
copy_len = loginfo->copy_range;
copy_len = loginfo->copy_range;
- }
size = NLMSG_SPACE(sizeof(*pm) + copy_len);
size = NLMSG_SPACE(sizeof(*pm) + copy_len);
@@
-257,9
+255,8
@@
static void ipt_ulog_packet(unsigned int hooknum,
BUG();
/* check if we are building multi-part messages */
BUG();
/* check if we are building multi-part messages */
- if (ub->qlen > 1)
{
+ if (ub->qlen > 1)
ub->lastnlh->nlmsg_flags |= NLM_F_MULTI;
ub->lastnlh->nlmsg_flags |= NLM_F_MULTI;
- }
ub->lastnlh = nlh;
ub->lastnlh = nlh;
@@
-328,25
+325,25
@@
static void ipt_logfn(unsigned int pf,
ipt_ulog_packet(hooknum, skb, in, out, &loginfo, prefix);
}
ipt_ulog_packet(hooknum, skb, in, out, &loginfo, prefix);
}
-static
int
ipt_ulog_checkentry(const char *tablename,
- const void *e,
- const struct xt_target *target,
- void *targinfo,
- unsigned int hookmask)
+static
bool
ipt_ulog_checkentry(const char *tablename,
+
const void *e,
+
const struct xt_target *target,
+
void *targinfo,
+
unsigned int hookmask)
{
{
-
struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *)
targinfo;
+
const struct ipt_ulog_info *loginfo =
targinfo;
if (loginfo->prefix[sizeof(loginfo->prefix) - 1] != '\0') {
DEBUGP("ipt_ULOG: prefix term %i\n",
loginfo->prefix[sizeof(loginfo->prefix) - 1]);
if (loginfo->prefix[sizeof(loginfo->prefix) - 1] != '\0') {
DEBUGP("ipt_ULOG: prefix term %i\n",
loginfo->prefix[sizeof(loginfo->prefix) - 1]);
- return
0
;
+ return
false
;
}
if (loginfo->qthreshold > ULOG_MAX_QLEN) {
DEBUGP("ipt_ULOG: queue threshold %i > MAX_QLEN\n",
loginfo->qthreshold);
}
if (loginfo->qthreshold > ULOG_MAX_QLEN) {
DEBUGP("ipt_ULOG: queue threshold %i > MAX_QLEN\n",
loginfo->qthreshold);
- return
0
;
+ return
false
;
}
}
- return
1
;
+ return
true
;
}
#ifdef CONFIG_COMPAT
}
#ifdef CONFIG_COMPAT
@@
-359,7
+356,7
@@
struct compat_ipt_ulog_info {
static void compat_from_user(void *dst, void *src)
{
static void compat_from_user(void *dst, void *src)
{
- struct compat_ipt_ulog_info *cl = src;
+
const
struct compat_ipt_ulog_info *cl = src;
struct ipt_ulog_info l = {
.nl_group = cl->nl_group,
.copy_range = cl->copy_range,
struct ipt_ulog_info l = {
.nl_group = cl->nl_group,
.copy_range = cl->copy_range,
@@
-372,7
+369,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 ipt_ulog_info *l = src;
+
const
struct ipt_ulog_info *l = src;
struct compat_ipt_ulog_info cl = {
.nl_group = l->nl_group,
.copy_range = l->copy_range,
struct compat_ipt_ulog_info cl = {
.nl_group = l->nl_group,
.copy_range = l->copy_range,
This page took
0.026279 seconds
and
5
git commands to generate.