-r is working
This commit is contained in:
@ -26,9 +26,9 @@
|
||||
static inline int readn(long fd, void *buf, size_t size) {
|
||||
size_t left = size;
|
||||
int r;
|
||||
char *bufptr = (char*)buf;
|
||||
char *bufptr = (char*) buf;
|
||||
while(left>0) {
|
||||
if ((r=read(fd ,bufptr,left)) == -1) {
|
||||
if ((r=read(fd, bufptr, left)) == -1) {
|
||||
if (errno == EINTR) continue;
|
||||
return -1;
|
||||
}
|
||||
@ -48,7 +48,7 @@ static inline int readn(long fd, void *buf, size_t size) {
|
||||
static inline int writen(long fd, void *buf, size_t size) {
|
||||
size_t left = size;
|
||||
int r;
|
||||
char *bufptr = (char*)buf;
|
||||
char *bufptr = (char*) buf;
|
||||
while(left>0) {
|
||||
if ((r=write(fd, bufptr, left)) == -1) {
|
||||
if (errno == EINTR) continue;
|
||||
|
||||
Reference in New Issue
Block a user