* [PATCH, TRIVIAL] remove more memsets
@ 2003-06-29 19:43 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2003-06-29 19:43 UTC (permalink / raw)
To: Harald Welte; +Cc: Netfilter Development Mailinglist
[-- 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-06-29 19:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-29 19:43 [PATCH, TRIVIAL] remove more memsets Patrick McHardy
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.