From: Karel Zak Date: Fri, 20 Jul 2018 12:53:25 +0000 (+0200) Subject: include/all-io: const cleanup X-Git-Tag: v2.33-rc1~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34708190d1c50579c7b241406f2ccec7552c7b6f;p=thirdparty%2Futil-linux.git include/all-io: const cleanup Signed-off-by: Karel Zak --- diff --git a/include/all-io.h b/include/all-io.h index 0623692e15..dd4556fcb6 100644 --- a/include/all-io.h +++ b/include/all-io.h @@ -25,7 +25,7 @@ static inline int write_all(int fd, const void *buf, size_t count) if (tmp > 0) { count -= tmp; if (count) - buf = (void *) ((char *) buf + tmp); + buf = (const void *) ((const char *) buf + tmp); } else if (errno != EINTR && errno != EAGAIN) return -1; if (errno == EAGAIN) /* Try later, *sigh* */ @@ -45,7 +45,7 @@ static inline int fwrite_all(const void *ptr, size_t size, if (tmp > 0) { nmemb -= tmp; if (nmemb) - ptr = (void *) ((char *) ptr + (tmp * size)); + ptr = (const void *) ((const char *) ptr + (tmp * size)); } else if (errno != EINTR && errno != EAGAIN) return -1; if (errno == EAGAIN) /* Try later, *sigh* */