include/all-io: const cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2018-07-20 14:53:25 +02:00
parent ea927bde6b
commit 34708190d1
1 changed files with 2 additions and 2 deletions

View File

@ -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* */