Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e72b2fe authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[NETFILTER]: x_tables: remove some unnecessary casts

parent 73654d61
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -561,7 +561,7 @@ static void
hashlimit_destroy(const struct xt_match *match, void *matchinfo,
hashlimit_destroy(const struct xt_match *match, void *matchinfo,
		  unsigned int matchsize)
		  unsigned int matchsize)
{
{
	struct ipt_hashlimit_info *r = (struct ipt_hashlimit_info *) matchinfo;
	struct ipt_hashlimit_info *r = matchinfo;


	htable_put(r->hinfo);
	htable_put(r->hinfo);
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -58,7 +58,7 @@ checkentry(const char *tablename,
	   unsigned int matchsize,
	   unsigned int matchsize,
	   unsigned int hook_mask)
	   unsigned int hook_mask)
{
{
	struct xt_connmark_info *cm = (struct xt_connmark_info *)matchinfo;
	struct xt_connmark_info *cm = matchinfo;


	if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) {
	if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) {
		printk(KERN_WARNING "connmark: only support 32bit mark\n");
		printk(KERN_WARNING "connmark: only support 32bit mark\n");
+1 −2
Original line number Original line Diff line number Diff line
@@ -101,8 +101,7 @@ match(const struct sk_buff *skb,
      unsigned int protoff,
      unsigned int protoff,
      int *hotdrop)
      int *hotdrop)
{
{
	const struct xt_dccp_info *info = 
	const struct xt_dccp_info *info = matchinfo;
				(const struct xt_dccp_info *)matchinfo;
	struct dccp_hdr _dh, *dh;
	struct dccp_hdr _dh, *dh;


	if (offset)
	if (offset)
+1 −1
Original line number Original line Diff line number Diff line
@@ -42,7 +42,7 @@ checkentry(const char *tablename,
           unsigned int matchsize,
           unsigned int matchsize,
           unsigned int hook_mask)
           unsigned int hook_mask)
{
{
	struct xt_mark_info *minfo = (struct xt_mark_info *) matchinfo;
	const struct xt_mark_info *minfo = matchinfo;


	if (minfo->mark > 0xffffffff || minfo->mask > 0xffffffff) {
	if (minfo->mark > 0xffffffff || minfo->mask > 0xffffffff) {
		printk(KERN_WARNING "mark: only supports 32bit mark\n");
		printk(KERN_WARNING "mark: only supports 32bit mark\n");
+1 −3
Original line number Original line Diff line number Diff line
@@ -129,11 +129,9 @@ match(const struct sk_buff *skb,
      unsigned int protoff,
      unsigned int protoff,
      int *hotdrop)
      int *hotdrop)
{
{
	const struct xt_sctp_info *info;
	const struct xt_sctp_info *info = matchinfo;
	sctp_sctphdr_t _sh, *sh;
	sctp_sctphdr_t _sh, *sh;


	info = (const struct xt_sctp_info *)matchinfo;

	if (offset) {
	if (offset) {
		duprintf("Dropping non-first fragment.. FIXME\n");
		duprintf("Dropping non-first fragment.. FIXME\n");
		return 0;
		return 0;
Loading