summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2011-06-22 11:21:01 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2011-06-22 11:21:01 +0200
commit4904bbeff9b575d17678ff839583662c9f7b12c4 (patch)
treef920cf5e2cc1cdd9c31ea9a53cfbdfa1ba037a31
parent6428f54328a433a86bdc0d7154ff3a7d322e0fb4 (diff)
downloadconntrack-tools-4904bbeff9b575d17678ff839583662c9f7b12c4.tar.gz
conntrack-tools-4904bbeff9b575d17678ff839583662c9f7b12c4.zip
conntrack: remove unused variable with -S
Error: UNUSED_VALUE: conntrack-tools-1.0.0/src/conntrack.c:1297: returned_pointer: Pointer "nl" returned by "strchr(buf, 10)" is never used. Reported-by: Jiri Popelka <jpopelka@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/conntrack.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/conntrack.c b/src/conntrack.c
index 3e1cb11..b695da4 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -1359,10 +1359,9 @@ static int display_proc_conntrack_stats(void)
/* trim off trailing \n */
nl = strchr(buf, '\n');
- if (nl != NULL) {
+ if (nl != NULL)
*nl = '\0';
- nl = strchr(buf, '\n');
- }
+
token = strtok(buf, " ");
for (i=0; token != NULL && i<CT_STATS_ENTRIES_MAX; i++) {
strncpy(output[i], token, CT_STATS_STRING_MAX);