From: Eric Leblond <eric@regit.org>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, Eric Leblond <eric@regit.org>
Subject: [PATCH] Fix typo in loop.
Date: Sat, 14 Jul 2012 23:40:32 +0200 [thread overview]
Message-ID: <1342302032-9108-2-git-send-email-eric@regit.org> (raw)
In-Reply-To: <1342302032-9108-1-git-send-email-eric@regit.org>
This patch fixes a small typo in the command line parsing.
---
src/nfacct.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/nfacct.c b/src/nfacct.c
index a59366e..8407670 100644
--- a/src/nfacct.c
+++ b/src/nfacct.c
@@ -159,9 +159,9 @@ static int nfacct_cmd_list(int argc, char *argv[])
int ret, i;
for (i=2; i<argc; i++) {
- if (strncmp(argv[i], "reset", strlen(argv[2])) == 0) {
+ if (strncmp(argv[i], "reset", strlen(argv[i])) == 0) {
zeroctr = true;
- } else if (strncmp(argv[i], "xml", strlen(argv[2])) == 0) {
+ } else if (strncmp(argv[i], "xml", strlen(argv[i])) == 0) {
xml = true;
} else {
nfacct_perror("unknown argument");
@@ -357,9 +357,9 @@ static int nfacct_cmd_get(int argc, char *argv[])
return -1;
}
for (i=3; i<argc; i++) {
- if (strncmp(argv[i], "reset", strlen(argv[2])) == 0) {
+ if (strncmp(argv[i], "reset", strlen(argv[i])) == 0) {
zeroctr = true;
- } else if (strncmp(argv[i], "xml", strlen(argv[2])) == 0) {
+ } else if (strncmp(argv[i], "xml", strlen(argv[i])) == 0) {
xml = true;
} else {
nfacct_perror("unknown argument");
--
1.7.10.4
next prev parent reply other threads:[~2012-07-14 21:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-14 21:40 [nfacct PATCH 0/1] Fix typo in cmd line parsing Eric Leblond
2012-07-14 21:40 ` Eric Leblond [this message]
2012-07-16 12:27 ` Pablo Neira Ayuso
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=1342302032-9108-2-git-send-email-eric@regit.org \
--to=eric@regit.org \
--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).