X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/80fc20d1d69b14f36ad9bb64d8af38481cbf1ff5..cf2b604507a71c61e757d7bf85458c7300eb3cf5:/components/temperature.c?ds=inline

diff --git a/components/temperature.c b/components/temperature.c
index 64199f5..4e27a9d 100644
--- a/components/temperature.c
+++ b/components/temperature.c
@@ -9,8 +9,11 @@
 	{
 		int temp;
 
-		return (pscanf(file, "%d", &temp) == 1) ?
-		       bprintf("%d", temp / 1000) : NULL;
+		if(pscanf(file, "%d", &temp) != 1) {
+			return NULL;
+		}
+
+		return bprintf("%d", temp / 1000);
 	}
 #elif defined(__OpenBSD__)
 	#include <errno.h>