From: Patrick McHardy <kaber@trash.net>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [PATCH] remove unnessesary 0-initilization of data in bss segment
Date: Tue, 08 Apr 2003 18:09:12 +0200 [thread overview]
Message-ID: <3E92F428.4050707@trash.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 91 bytes --]
This patch removes a couple of memset(.., 0, ..) of data in the bss
segment.
Bye,
Patrick
[-- Attachment #2: nobssinit-pom.diff --]
[-- Type: text/plain, Size: 4092 bytes --]
diff -urN a/pending/30_netfilter-nobssinit.patch b/pending/30_netfilter-nobssinit.patch
--- a/pending/30_netfilter-nobssinit.patch 1970-01-01 01:00:00.000000000 +0100
+++ b/pending/30_netfilter-nobssinit.patch 2003-04-08 16:15:25.000000000 +0200
@@ -0,0 +1,77 @@
+# This is a BitKeeper generated patch for the following project:
+# Project Name: Linux kernel tree
+# This patch format is intended for GNU patch command version 2.5 or higher.
+# This patch includes the following deltas:
+# ChangeSet 1.1058 -> 1.1059
+# net/ipv4/netfilter/ip_nat_ftp.c 1.6 -> 1.7
+# net/ipv4/netfilter/ip_conntrack_irc.c 1.5 -> 1.6
+# net/ipv4/netfilter/ipt_ULOG.c 1.6 -> 1.7
+# net/ipv4/netfilter/ip_conntrack_ftp.c 1.8 -> 1.9
+# net/ipv4/netfilter/ip_nat_irc.c 1.3 -> 1.4
+#
+# The following is the BitKeeper ChangeSet Log
+# --------------------------------------------
+# 03/03/27 kaber@trash.net 1.1059
+# [NETFILTER]: remove unnessasary initilization to zero of data located in bss segment
+# --------------------------------------------
+#
+diff -Nru a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c
+--- a/net/ipv4/netfilter/ip_conntrack_ftp.c Thu Mar 27 02:01:47 2003
++++ b/net/ipv4/netfilter/ip_conntrack_ftp.c Thu Mar 27 02:01:47 2003
+@@ -405,7 +405,6 @@
+ ports[0] = FTP_PORT;
+
+ for (i = 0; (i < MAX_PORTS) && ports[i]; i++) {
+- memset(&ftp[i], 0, sizeof(struct ip_conntrack_helper));
+ ftp[i].tuple.src.u.tcp.port = htons(ports[i]);
+ ftp[i].tuple.dst.protonum = IPPROTO_TCP;
+ ftp[i].mask.src.u.tcp.port = 0xFFFF;
+diff -Nru a/net/ipv4/netfilter/ip_conntrack_irc.c b/net/ipv4/netfilter/ip_conntrack_irc.c
+--- a/net/ipv4/netfilter/ip_conntrack_irc.c Thu Mar 27 02:01:47 2003
++++ b/net/ipv4/netfilter/ip_conntrack_irc.c Thu Mar 27 02:01:47 2003
+@@ -259,8 +259,6 @@
+
+ for (i = 0; (i < MAX_PORTS) && ports[i]; i++) {
+ hlpr = &irc_helpers[i];
+- memset(hlpr, 0,
+- sizeof(struct ip_conntrack_helper));
+ hlpr->tuple.src.u.tcp.port = htons(ports[i]);
+ hlpr->tuple.dst.protonum = IPPROTO_TCP;
+ hlpr->mask.src.u.tcp.port = 0xFFFF;
+diff -Nru a/net/ipv4/netfilter/ip_nat_ftp.c b/net/ipv4/netfilter/ip_nat_ftp.c
+--- a/net/ipv4/netfilter/ip_nat_ftp.c Thu Mar 27 02:01:47 2003
++++ b/net/ipv4/netfilter/ip_nat_ftp.c Thu Mar 27 02:01:47 2003
+@@ -306,9 +306,6 @@
+ ports[0] = FTP_PORT;
+
+ for (i = 0; (i < MAX_PORTS) && ports[i]; i++) {
+-
+- memset(&ftp[i], 0, sizeof(struct ip_nat_helper));
+-
+ ftp[i].tuple.dst.protonum = IPPROTO_TCP;
+ ftp[i].tuple.src.u.tcp.port = htons(ports[i]);
+ ftp[i].mask.dst.protonum = 0xFFFF;
+diff -Nru a/net/ipv4/netfilter/ip_nat_irc.c b/net/ipv4/netfilter/ip_nat_irc.c
+--- a/net/ipv4/netfilter/ip_nat_irc.c Thu Mar 27 02:01:47 2003
++++ b/net/ipv4/netfilter/ip_nat_irc.c Thu Mar 27 02:01:47 2003
+@@ -243,9 +243,6 @@
+
+ for (i = 0; (i < MAX_PORTS) && ports[i] != 0; i++) {
+ hlpr = &ip_nat_irc_helpers[i];
+- memset(hlpr, 0,
+- sizeof(struct ip_nat_helper));
+-
+ hlpr->tuple.dst.protonum = IPPROTO_TCP;
+ hlpr->tuple.src.u.tcp.port = htons(ports[i]);
+ hlpr->mask.src.u.tcp.port = 0xFFFF;
+diff -Nru a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
+--- a/net/ipv4/netfilter/ipt_ULOG.c Thu Mar 27 02:01:47 2003
++++ b/net/ipv4/netfilter/ipt_ULOG.c Thu Mar 27 02:01:47 2003
+@@ -322,7 +322,6 @@
+
+ /* initialize ulog_buffers */
+ for (i = 0; i < ULOG_MAXNLGROUPS; i++) {
+- memset(&ulog_buffers[i], 0, sizeof(ulog_buff_t));
+ init_timer(&ulog_buffers[i].timer);
+ ulog_buffers[i].timer.function = ulog_timer;
+ ulog_buffers[i].timer.data = i;
diff -urN a/pending/30_netfilter-nobssinit.patch.help b/pending/30_netfilter-nobssinit.patch.help
--- a/pending/30_netfilter-nobssinit.patch.help 1970-01-01 01:00:00.000000000 +0100
+++ b/pending/30_netfilter-nobssinit.patch.help 2003-04-08 16:16:40.000000000 +0200
@@ -0,0 +1,5 @@
+Author: Patrick McHardy <kaber@trash.net>
+Status: Working
+
+This patch removes a couple of unneeded zero-initializations of data
+located in the bss segment.
next reply other threads:[~2003-04-08 16:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-08 16:09 Patrick McHardy [this message]
2003-04-11 9:55 ` [PATCH] remove unnessesary 0-initilization of data in bss segment Jozsef Kadlecsik
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=3E92F428.4050707@trash.net \
--to=kaber@trash.net \
--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.