Skip to content

Commit

Permalink
Tweak to library
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebenezer-group committed Dec 25, 2024
1 parent 1109da9 commit bb255a0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/cmwBuffer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,10 @@ inline int getError (){
#ifndef CMW_WINDOWS
inline void Write (int fd,char const* data,int len){
for(;;){
if(int r=::write(fd,data,len);r<0)raise("Write",errno);
else{
if(0==(len-=r))break;
data+=r;
}
if(int r=::write(fd,data,len);r>=0){
if(0==(len-=r))return;
data+=r;
}else raise("Write",errno);
}
}

Expand Down

0 comments on commit bb255a0

Please sign in to comment.