netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Leblond <eric@inl.fr>
To: pablo@netfilter.org
Cc: jengelh@medozas.de, netfilter-devel@vger.kernel.org,
	Eric Leblond <eric@inl.fr>
Subject: [libnfnetlink] Suppress iftable_up function which is no used.
Date: Mon, 22 Dec 2008 23:07:55 +0100	[thread overview]
Message-ID: <1229983675-5025-1-git-send-email-eric@inl.fr> (raw)
In-Reply-To: <alpine.LNX.1.10.0812221909100.26910@fbirervta.pbzchgretzou.qr>

Following compilation warning pointed out by Jan Engelhardt, this patch
suppresses the iftable_up function which is of no use in this part of
libnfnetlink library whom goal is to do ifindex to name resolution.

Signed-off-by: Eric Leblond <eric@inl.fr>
---
 src/iftable.c |   17 -----------------
 1 files changed, 0 insertions(+), 17 deletions(-)

diff --git a/src/iftable.c b/src/iftable.c
index b6a8e72..7cca66f 100644
--- a/src/iftable.c
+++ b/src/iftable.c
@@ -172,23 +172,6 @@ int nlif_index2name(struct nlif_handle *h,
 	return -1;
 }
 
-static int iftable_up(struct nlif_handle *h, unsigned int index)
-{
-	unsigned int hash;
-	struct ifindex_node *this;
-
-	hash = index & 0xF;
-	list_for_each_entry(this, &h->ifindex_hash[hash], head) {
-		if (this->index == index) {
-			if (this->flags & IFF_UP)
-				return 1;
-			else
-				return 0;
-		}
-	}
-	return -1;
-}
-
 /** Initialize interface table
  *
  * Initialize rtnl interface and interface table
-- 
1.5.6.3


  reply	other threads:[~2008-12-22 22:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-22 18:13 Compiler warnings on libnetfilter_* Jan Engelhardt
2008-12-22 22:07 ` Eric Leblond [this message]
2008-12-22 22:11   ` [libnfnetlink] Suppress iftable_up function which is no used Pablo Neira Ayuso
2008-12-22 22:21 ` Compiler warnings on libnetfilter_* Pablo Neira Ayuso
2008-12-24 19:13   ` Jan Engelhardt

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=1229983675-5025-1-git-send-email-eric@inl.fr \
    --to=eric@inl.fr \
    --cc=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@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 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).