lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231115071109.11511-1-zhujun2@cmss.chinamobile.com>
Date:   Tue, 14 Nov 2023 23:11:09 -0800
From:   zhujun2 <zhujun2@...s.chinamobile.com>
To:     acme@...nel.org
Cc:     irogers@...gle.com, ast@...nel.org, namhyung@...nel.org,
        kuba@...nel.org, linux-kernel@...r.kernel.org,
        zhujun2@...s.chinamobile.com
Subject: [PATCH] toos:leds: Fix printf format string in uledmon.c

When the argument type is 'int',printf '%d'
in format string.Problem found during code reading.

Signed-off-by: zhujun2 <zhujun2@...s.chinamobile.com>
---
 tools/leds/uledmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/leds/uledmon.c b/tools/leds/uledmon.c
index c15a39c1f271..62befe06eab5 100644
--- a/tools/leds/uledmon.c
+++ b/tools/leds/uledmon.c
@@ -55,7 +55,7 @@ int main(int argc, char const *argv[])
 			return 1;
 		}
 		clock_gettime(CLOCK_MONOTONIC, &ts);
-		printf("[%ld.%09ld] %u\n", ts.tv_sec, ts.tv_nsec, brightness);
+		printf("[%ld.%09ld] %d\n", ts.tv_sec, ts.tv_nsec, brightness);
 	}
 
 	close(fd);
-- 
2.17.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ