From: Jan Engelhardt <jengelh@medozas.de>
To: kaber@trash.net
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 3/3] extensions: remove redundant casts
Date: Fri, 5 Jun 2009 21:25:55 +0200 [thread overview]
Message-ID: <1244229955-27642-4-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1244229955-27642-1-git-send-email-jengelh@medozas.de>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
extensions/libipt_realm.c | 4 ++--
extensions/libxt_multiport.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/extensions/libipt_realm.c b/extensions/libipt_realm.c
index 0580610..c9e1760 100644
--- a/extensions/libipt_realm.c
+++ b/extensions/libipt_realm.c
@@ -86,14 +86,14 @@ static void load_realms(void)
continue;
/* found valid data */
- newnm = (struct realmname*)malloc(sizeof(struct realmname));
+ newnm = malloc(sizeof(struct realmname));
if (newnm == NULL) {
perror("libipt_realm: malloc failed");
exit(1);
}
newnm->id = id;
newnm->len = nxt - cur;
- newnm->name = (char*)malloc(newnm->len + 1);
+ newnm->name = malloc(newnm->len + 1);
if (newnm->name == NULL) {
perror("libipt_realm: malloc failed");
exit(1);
diff --git a/extensions/libxt_multiport.c b/extensions/libxt_multiport.c
index c3c8bb9..9959a20 100644
--- a/extensions/libxt_multiport.c
+++ b/extensions/libxt_multiport.c
@@ -215,7 +215,7 @@ static int
multiport_parse6(int c, char **argv, int invert, unsigned int *flags,
const void *e, struct xt_entry_match **match)
{
- const struct ip6t_entry *entry = (const struct ip6t_entry *)e;
+ const struct ip6t_entry *entry = e;
return __multiport_parse(c, argv, invert, flags, match,
entry->ipv6.proto, entry->ipv6.invflags);
}
@@ -278,7 +278,7 @@ static int
multiport_parse6_v1(int c, char **argv, int invert, unsigned int *flags,
const void *e, struct xt_entry_match **match)
{
- const struct ip6t_entry *entry = (const struct ip6t_entry *)e;
+ const struct ip6t_entry *entry = e;
return __multiport_parse_v1(c, argv, invert, flags, match,
entry->ipv6.proto, entry->ipv6.invflags);
}
@@ -358,7 +358,7 @@ static void multiport_print(const void *ip_void,
static void multiport_print6(const void *ip_void,
const struct xt_entry_match *match, int numeric)
{
- const struct ip6t_ip6 *ip = (const struct ip6t_ip6 *)ip_void;
+ const struct ip6t_ip6 *ip = ip_void;
__multiport_print(match, numeric, ip->proto);
}
@@ -413,7 +413,7 @@ static void multiport_print_v1(const void *ip_void,
static void multiport_print6_v1(const void *ip_void,
const struct xt_entry_match *match, int numeric)
{
- const struct ip6t_ip6 *ip = (const struct ip6t_ip6 *)ip_void;
+ const struct ip6t_ip6 *ip = ip_void;
__multiport_print_v1(match, numeric, ip->proto);
}
@@ -456,7 +456,7 @@ static void multiport_save(const void *ip_void,
static void multiport_save6(const void *ip_void,
const struct xt_entry_match *match)
{
- const struct ip6t_ip6 *ip = (const struct ip6t_ip6 *)ip_void;
+ const struct ip6t_ip6 *ip = ip_void;
__multiport_save(match, ip->proto);
}
@@ -505,7 +505,7 @@ static void multiport_save_v1(const void *ip_void,
static void multiport_save6_v1(const void *ip_void,
const struct xt_entry_match *match)
{
- const struct ip6t_ip6 *ip = (const struct ip6t_ip6 *)ip_void;
+ const struct ip6t_ip6 *ip = ip_void;
__multiport_save_v1(match, ip->proto);
}
--
1.6.3.1
next prev parent reply other threads:[~2009-06-05 19:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 19:25 iptables: pull request June-05 Jan Engelhardt
2009-06-05 19:25 ` [PATCH 1/3] iptables: accept multiple IP address specifications for -s, -d Jan Engelhardt
2009-06-06 6:53 ` Pablo Neira Ayuso
2009-06-06 11:16 ` Jan Engelhardt
2009-06-07 21:12 ` Pablo Neira Ayuso
2009-06-08 13:50 ` Patrick McHardy
2009-06-10 12:16 ` Jan Engelhardt
2009-06-10 12:19 ` Patrick McHardy
2009-06-25 17:08 ` Jan Engelhardt
2009-07-16 14:24 ` Jan Engelhardt
2009-07-17 14:31 ` Patrick McHardy
2009-07-17 15:55 ` Jan Engelhardt
2009-06-05 19:25 ` [PATCH 2/3] DNAT/SNAT: add manpage documentation for --persistent flag Jan Engelhardt
2009-06-08 13:46 ` Patrick McHardy
2009-06-05 19:25 ` Jan Engelhardt [this message]
2009-06-08 13:47 ` [PATCH 3/3] extensions: remove redundant casts Patrick McHardy
2009-06-08 13:45 ` iptables: pull request June-05 Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1244229955-27642-4-git-send-email-jengelh@medozas.de \
--to=jengelh@medozas.de \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).