mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56: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);
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user