All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Harald Welte <laforge@gnumonks.org>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [PATCH, TRIVIAL] remove more memsets
Date: Sun, 29 Jun 2003 21:43:50 +0200	[thread overview]
Message-ID: <3EFF4176.8030704@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 104 bytes --]

Hi Harald,
these patches (2.4 and 2.5) removes the remaining unnecessary memsets.
Best regards,
Patrick

[-- Attachment #2: nf-more-memsets-2.4.diff --]
[-- Type: text/plain, Size: 1926 bytes --]

===== net/ipv4/netfilter/ip_conntrack_amanda.c 1.2 vs edited =====
--- 1.2/net/ipv4/netfilter/ip_conntrack_amanda.c	Mon Apr 28 03:52:54 2003
+++ edited/net/ipv4/netfilter/ip_conntrack_amanda.c	Sun Jun 29 21:30:43 2003
@@ -205,7 +205,6 @@
 {
 	int ret;
 
-	memset(&amanda_helper, 0, sizeof(struct ip_conntrack_helper));
 	amanda_helper.tuple.src.u.udp.port = htons(10080);
 	amanda_helper.tuple.dst.protonum = IPPROTO_UDP;
 	amanda_helper.mask.src.u.udp.port = 0xFFFF;
===== net/ipv4/netfilter/ip_conntrack_tftp.c 1.1 vs edited =====
--- 1.1/net/ipv4/netfilter/ip_conntrack_tftp.c	Mon Mar 31 17:08:21 2003
+++ edited/net/ipv4/netfilter/ip_conntrack_tftp.c	Sun Jun 29 21:31:10 2003
@@ -94,8 +94,6 @@
 
 	for (i = 0 ; (i < MAX_PORTS) && ports[i] ; i++) {
 		/* Create helper structure */
-		memset(&tftp[i], 0, sizeof(struct ip_conntrack_helper));
-
 		tftp[i].tuple.dst.protonum = IPPROTO_UDP;
 		tftp[i].tuple.src.u.udp.port = htons(ports[i]);
 		tftp[i].mask.dst.protonum = 0xFFFF;
===== net/ipv4/netfilter/ip_nat_amanda.c 1.2 vs edited =====
--- 1.2/net/ipv4/netfilter/ip_nat_amanda.c	Wed Jun 25 00:16:00 2003
+++ edited/net/ipv4/netfilter/ip_nat_amanda.c	Sun Jun 29 21:31:40 2003
@@ -195,8 +195,6 @@
 	struct ip_nat_helper *hlpr;
 
 	hlpr = &ip_nat_amanda_helper;
-	memset(hlpr, 0, sizeof(struct ip_nat_helper));
-
 	hlpr->tuple.dst.protonum = IPPROTO_UDP;
 	hlpr->tuple.src.u.udp.port = htons(10080);
 	hlpr->mask.src.u.udp.port = 0xFFFF;
===== net/ipv4/netfilter/ip_nat_tftp.c 1.1 vs edited =====
--- 1.1/net/ipv4/netfilter/ip_nat_tftp.c	Mon Mar 31 17:08:21 2003
+++ edited/net/ipv4/netfilter/ip_nat_tftp.c	Sun Jun 29 21:31:53 2003
@@ -160,8 +160,6 @@
 		ports[0] = TFTP_PORT;
 
 	for (i = 0 ; (i < MAX_PORTS) && ports[i] ; i++) {
-		memset(&tftp[i], 0, sizeof(struct ip_nat_helper));
-
 		tftp[i].tuple.dst.protonum = IPPROTO_UDP;
 		tftp[i].tuple.src.u.udp.port = htons(ports[i]);
 		tftp[i].mask.dst.protonum = 0xFFFF;

[-- Attachment #3: nf-more-memsets-2.5.diff --]
[-- Type: text/plain, Size: 1458 bytes --]

===== net/ipv4/netfilter/ip_conntrack_tftp.c 1.3 vs edited =====
--- 1.3/net/ipv4/netfilter/ip_conntrack_tftp.c	Fri May 23 09:53:22 2003
+++ edited/net/ipv4/netfilter/ip_conntrack_tftp.c	Sun Jun 29 21:38:52 2003
@@ -97,8 +97,6 @@
 
 	for (i = 0 ; (i < MAX_PORTS) && ports[i] ; i++) {
 		/* Create helper structure */
-		memset(&tftp[i], 0, sizeof(struct ip_conntrack_helper));
-
 		tftp[i].tuple.dst.protonum = IPPROTO_UDP;
 		tftp[i].tuple.src.u.udp.port = htons(ports[i]);
 		tftp[i].mask.dst.protonum = 0xFFFF;
===== net/ipv4/netfilter/ip_nat_amanda.c 1.3 vs edited =====
--- 1.3/net/ipv4/netfilter/ip_nat_amanda.c	Wed Jun 25 00:34:39 2003
+++ edited/net/ipv4/netfilter/ip_nat_amanda.c	Sun Jun 29 21:38:53 2003
@@ -195,8 +195,6 @@
 	struct ip_nat_helper *hlpr;
 
 	hlpr = &ip_nat_amanda_helper;
-	memset(hlpr, 0, sizeof(struct ip_nat_helper));
-
 	hlpr->tuple.dst.protonum = IPPROTO_UDP;
 	hlpr->tuple.src.u.udp.port = htons(10080);
 	hlpr->mask.src.u.udp.port = 0xFFFF;
===== net/ipv4/netfilter/ip_nat_tftp.c 1.3 vs edited =====
--- 1.3/net/ipv4/netfilter/ip_nat_tftp.c	Tue May  6 10:04:01 2003
+++ edited/net/ipv4/netfilter/ip_nat_tftp.c	Sun Jun 29 21:38:53 2003
@@ -164,8 +164,6 @@
 		ports[0] = TFTP_PORT;
 
 	for (i = 0 ; (i < MAX_PORTS) && ports[i] ; i++) {
-		memset(&tftp[i], 0, sizeof(struct ip_nat_helper));
-
 		tftp[i].tuple.dst.protonum = IPPROTO_UDP;
 		tftp[i].tuple.src.u.udp.port = htons(ports[i]);
 		tftp[i].mask.dst.protonum = 0xFFFF;

                 reply	other threads:[~2003-06-29 19:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3EFF4176.8030704@trash.net \
    --to=kaber@trash.net \
    --cc=laforge@gnumonks.org \
    --cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.