rem: if (writefd(f,buf,len) != len) { fprintf(stderr,"write_buf failed : %s\n",strerror(errno));
add: int ret; if ((ret=writefd(f,buf,len)) != len) { fprintf(stderr,"write_buf failed : %s\n", ret==-1?strerror(errno):"EOF");
context: void write_buf(int f,char *buf,int len){  if (writefd(f,buf,len) != len) {    fprintf(stderr,"write_buf failed : %s\n",strerror(errno));    exit(1);  }  total_written += len;}