(turn): Check whether fclose() succeeds.

This commit is contained in:
Marc Olzheim 2005-03-25 23:59:48 +00:00
parent 899bc18853
commit 73a94a3591

View file

@ -113,7 +113,13 @@ turn(void)
msgfilepath);
return RET_SYS;
}
fclose(fptr);
if (fclose(fptr)) {
pr("Something went wrong closing the message.\n");
logerror("Could not properly close message file (%s).\n",
msgfilepath);
return RET_SYS;
}
pr("\n");
return RET_OK;