bugssss
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* tipo del messaggio
|
||||
*/
|
||||
typedef struct msg {
|
||||
int len;
|
||||
long len;
|
||||
char *str;
|
||||
} msg_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user