mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
Fix fwrite() result check
This commit is contained in:
2
repmgr.c
2
repmgr.c
@@ -782,7 +782,7 @@ repmgrd_pause(PG_FUNCTION_ARGS)
|
|||||||
pause ? 1 : 0);
|
pause ? 1 : 0);
|
||||||
LWLockRelease(shared_state->lock);
|
LWLockRelease(shared_state->lock);
|
||||||
|
|
||||||
if (fwrite(buf.data, strlen(buf.data) + 1, 1, file) != strlen(buf.data) + 1)
|
if (fwrite(buf.data, strlen(buf.data) + 1, 1, file) != 1)
|
||||||
{
|
{
|
||||||
elog(WARNING, _("unable to write to file %s"), REPMGRD_STATE_FILE);
|
elog(WARNING, _("unable to write to file %s"), REPMGRD_STATE_FILE);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user