mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: kernel-janitors@vger.kernel.org,
	Alexei Starovoitov <ast@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	John Fastabend <john.fastabend@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] samples/sockmap: Fix duplicate error messages in sockmap_test_sockets()
Date: Thu, 9 Nov 2017 13:45:24 +0100	[thread overview]
Message-ID: <01568b12-0d05-2932-271c-6471ec94b0ba@users.sourceforge.net> (raw)

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 9 Nov 2017 13:37:28 +0100

Duplicate error messages were used so far in this function implementation.
Make them unique instead.

This issue was detected by using the Coccinelle software.

Fixes: 69e8cc134bcbf0ccfcf852c400b8e6788d1d0038 ("bpf: sockmap sample program")
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 samples/sockmap/sockmap_user.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/samples/sockmap/sockmap_user.c b/samples/sockmap/sockmap_user.c
index 7cc9d228216f..c021f8a23d6c 100644
--- a/samples/sockmap/sockmap_user.c
+++ b/samples/sockmap/sockmap_user.c
@@ -117,7 +117,7 @@ static int sockmap_test_sockets(int rate, int dot)
 	addr.sin_port = htons(S2_PORT);
 	err = listen(s2, 32);
 	if (err < 0) {
-		perror("listen s1 failed()\n");
+		perror("listen s2 failed()\n");
 		goto out;
 	}
 
@@ -145,7 +145,7 @@ static int sockmap_test_sockets(int rate, int dot)
 
 	p2 = accept(s2, NULL, NULL);
 	if (p2 < 0) {
-		perror("accept s1 failed()\n");
+		perror("accept s2 failed()\n");
 		goto out;
 	}
 
-- 
2.15.0

                 reply	other threads:[~2017-11-09 12:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=01568b12-0d05-2932-271c-6471ec94b0ba@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=ast@kernel.org \
    --cc=davem@davemloft.net \
    --cc=john.fastabend@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®