From e2d80d2da476f583b77d793bcbf23b59a5d1266e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 22 Feb 2026 13:18:45 +0100 Subject: misc fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- coreupdown.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coreupdown.c') diff --git a/coreupdown.c b/coreupdown.c index 283a1de..ba80758 100644 --- a/coreupdown.c +++ b/coreupdown.c @@ -30,7 +30,7 @@ coreupdown(unsigned long int count, const char *postcommand) int fd, have_success = 0, have_failure = 0; for (i = 1; i; i++) { - sprintf(path, "/sys/devices/system/cpu/cpu%zu/online", i); + sprintf(path, "/sys/devices/system/cpu/cpu%lu/online", i); fd = open(path, O_WRONLY); if (fd < 0) { if (errno == ENOENT) @@ -337,7 +337,7 @@ writefile(const char *path, const char *data, size_t len) exit(1); } - for (off = 0; off < len; off++) { + for (off = 0; off < len;) { r = write(fd, &data[off], len - off); if (r < 0) { if (errno == EINTR) -- cgit v1.2.3-70-g09d2