missed one unchecked call to ftruncate()
This commit is contained in:
@ -910,7 +910,8 @@ void FixAveTime::invoke_vector(bigint ntimestep)
|
|||||||
fflush(fp);
|
fflush(fp);
|
||||||
if (overwrite) {
|
if (overwrite) {
|
||||||
long fileend = ftell(fp);
|
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