This commit is contained in:
elvis
2022-04-24 01:36:43 +02:00
parent 4fe23200bc
commit 9eaf9cdd49
9 changed files with 163 additions and 82 deletions

View File

@ -28,7 +28,7 @@ static inline int readn(long fd, void *buf, size_t size) {
int r;
char *bufptr = (char*)buf;
while(left>0) {
if ((r=read((int)fd ,bufptr,left)) == -1) {
if ((r=read(fd ,bufptr,left)) == -1) {
if (errno == EINTR) continue;
return -1;
}
@ -50,7 +50,7 @@ static inline int writen(long fd, void *buf, size_t size) {
int r;
char *bufptr = (char*)buf;
while(left>0) {
if ((r=write((int) fd, bufptr, left)) == -1) {
if ((r=write(fd, bufptr, left)) == -1) {
if (errno == EINTR) continue;
return -1;
}