check status of ftruncate() in ave/* fixes
This commit is contained in:
@ -1055,7 +1055,8 @@ void FixAveChunk::end_of_step()
|
||||
|
||||
if (overwrite) {
|
||||
long fileend = ftell(fp);
|
||||
if (fileend > 0) ftruncate(fileno(fp),fileend);
|
||||
if ((fileend > 0) && (ftruncate(fileno(fp),fileend)))
|
||||
perror("Error while tuncating output");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user