char b[4];
if ((ret=readfd(f,b,4)) != 4) {
if (verbose > 1)
- fprintf(FERROR,"Error reading %d bytes : %s\n",
- 4,ret==-1?strerror(errno):"EOF");
+ fprintf(FERROR,"(%d) Error reading %d bytes : %s\n",
+ getpid(),4,ret==-1?strerror(errno):"EOF");
exit_cleanup(1);
}
total_read += 4;
int ret;
if ((ret=readfd(f,buf,len)) != len) {
if (verbose > 1)
- fprintf(FERROR,"Error reading %d bytes : %s\n",
- len,ret==-1?strerror(errno):"EOF");
+ fprintf(FERROR,"(%d) Error reading %d bytes : %s\n",
+ getpid(),len,ret==-1?strerror(errno):"EOF");
exit_cleanup(1);
}
total_read += len;
unsigned char read_byte(int f)
{
- char c;
- read_buf(f,&c,1);
- return (unsigned char)c;
+ unsigned char c;
+ read_buf(f,(char *)&c,1);
+ return c;
}