projects
/
libjh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
write_nointr takes a const char* buffer
[libjh.git]
/
io.c
diff --git
a/io.c
b/io.c
index
ef1f912
..
a0c2ec2
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-8,7
+8,6
@@
HEADER #include <stdbool.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
-#include <assert.h>
#include <sys/mman.h>
// Wrapper for `read` that retries on partial reads.
#include <sys/mman.h>
// Wrapper for `read` that retries on partial reads.
@@
-42,7
+41,7
@@
PUBLIC_FN ssize_t read_nointr(int fd, void *buf, size_t count, int *last_res) {
// - -1: error
// - 0: stream ended
// - 1: no problems occured
// - -1: error
// - 0: stream ended
// - 1: no problems occured
-PUBLIC_FN ssize_t write_nointr(int fd, void *buf, ssize_t count, int *last_res) {
+PUBLIC_FN ssize_t write_nointr(int fd,
const
void *buf, ssize_t count, int *last_res) {
if (count == -1) count = strlen(buf);
errno = 0;
size_t done = 0;
if (count == -1) count = strlen(buf);
errno = 0;
size_t done = 0;
@@
-214,4
+213,4
@@
err_dup_out:
fclose(*in);
err_out:
return EAI_SYSTEM;
fclose(*in);
err_out:
return EAI_SYSTEM;
-}
\ No newline at end of file
+}