29 lines
918 B
Diff
29 lines
918 B
Diff
|
From 3920e0687deff04c52ac73ebdbd950c13ef1f77e Mon Sep 17 00:00:00 2001
|
||
|
From: Neil Horman <neil.horman@privafy.com>
|
||
|
Date: Wed, 22 Mar 2023 17:30:01 -0400
|
||
|
Subject: [PATCH 11/13] Fix signedness of error handling
|
||
|
|
||
|
---
|
||
|
thermal.c | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/thermal.c b/thermal.c
|
||
|
index 035e0ad..902d7e9 100644
|
||
|
--- a/thermal.c
|
||
|
+++ b/thermal.c
|
||
|
@@ -190,9 +190,9 @@ static int handle_groupid(struct nl_msg *msg, void *arg)
|
||
|
static int handle_error(struct sockaddr_nl *sk_addr __attribute__((unused)),
|
||
|
struct nlmsgerr *err, void *arg)
|
||
|
{
|
||
|
- int rc = (err->error == NLE_INTR) ? NL_SKIP : NL_STOP;
|
||
|
+ int rc = (err->error == -NLE_INTR) ? NL_SKIP : NL_STOP;
|
||
|
|
||
|
- if (arg && err->error != NLE_INTR) {
|
||
|
+ if (arg && err->error != -NLE_INTR) {
|
||
|
log(TO_ALL, LOG_INFO, "thermal: received a netlink error (%s).\n",
|
||
|
nl_geterror(err->error));
|
||
|
*((int *)arg) = err->error;
|
||
|
--
|
||
|
2.33.1
|
||
|
|