patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH v1] lib/power: fix incorrect parameter to strerror
@ 2019-11-25 15:00 David Hunt
  2019-11-25 23:27 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: David Hunt @ 2019-11-25 15:00 UTC (permalink / raw)
  To: dev; +Cc: john.mcnamara, David Hunt, stable

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v1] lib/power: fix incorrect parameter to strerror
  2019-11-25 15:00 [dpdk-stable] [PATCH v1] lib/power: fix incorrect parameter to strerror David Hunt
@ 2019-11-25 23:27 ` " Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2019-11-25 23:27 UTC (permalink / raw)
  To: David Hunt; +Cc: dev, john.mcnamara, stable

25/11/2019 16:00, David Hunt:
> 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>

Applied, thanks



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-25 15:00 [dpdk-stable] [PATCH v1] lib/power: fix incorrect parameter to strerror David Hunt
2019-11-25 23:27 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox