1
0
mirror of synced 2026-04-18 22:38:41 +08:00

!3 修复init方法返回值错误

This commit is contained in:
微希夷
2021-04-07 12:36:16 +08:00
committed by yitter
parent 70b1080665
commit a8c4325a28

View File

@@ -64,12 +64,12 @@ static int snowdrift_init()
if (shm_alloc(&shmctx) == -1)
{
zend_throw_exception_ex(NULL, 0, "shared memory malloc failed");
RETURN_FALSE;
return FAILURE;
}
if (SD_G(MaxSeqNumber) <= SD_G(MinSeqNumber))
{
zend_throw_exception_ex(NULL, 0, "MaxSeqNumber must GE then MinSeqNumber");
RETURN_FALSE;
return FAILURE;
}
bzero(shmctx.addr, num * sizeof(snowflake));
sf = (snowflake *)shmctx.addr;