lib/power: fix incorrect parameter to strerror
PATCH 1/1 lib/power: fix incorrect parameter to strerror
Should be passing errno rather than ret, which could be negative.
Coverity issue: 350362
Fixes 9dc843eb273b ("power: extend guest channel API for reading")
Signed-off-by David Hunt <[email protected]>
--- lib/librte_power/guest_channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_power/guest_channel.c +1 -1
@@ -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 ; }
Signature · 1 line
2.17.1
Thomas Monjalon
Applied25/11/2019 16:00, David Hunt:
Quoted 7 lines
Should be passing errno rather than ret, which could be negative.
Coverity issue: 350362
Fixes 9dc843eb273b ("power: extend guest channel API for reading")Signed-off-by David Hunt <[email protected]>
Applied, thanks