patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Hunt <david.hunt@intel.com>
To: dev@dpdk.org
Cc: john.mcnamara@intel.com, David Hunt <david.hunt@intel.com>,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH v1] lib/power: fix incorrect parameter to strerror
Date: Mon, 25 Nov 2019 15:00:42 +0000	[thread overview]
Message-ID: <20191125150042.12340-1-david.hunt@intel.com> (raw)

Should be passing errno rather than ret, which could be negative.

Coverity issue: 350362
Fixes: 9dc843eb273b ("power: extend guest channel API for reading")
Cc: stable@dpdk.org

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_power/guest_channel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index 439cd2f38..b984d55bc 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -148,7 +148,7 @@ int power_guest_channel_read_msg(void *pkt,
 		return -1;
 	} else if (ret < 0) {
 		RTE_LOG(ERR, GUEST_CHANNEL, "Error occurred during poll function: %s\n",
-				strerror(ret));
+				strerror(errno));
 		return -1;
 	}
 
-- 
2.17.1


             reply	other threads:[~2019-11-25 15:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 15:00 David Hunt [this message]
2019-11-25 23:27 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

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=20191125150042.12340-1-david.hunt@intel.com \
    --to=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=stable@dpdk.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).