aboutsummaryrefslogtreecommitdiffstats
path: root/coreupdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreupdown.c')
-rw-r--r--coreupdown.c4
1 files changed, 2 insertions, 2 deletions
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)