Browse Source

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

tags/v1.1.0
微希夷 yitter 4 years ago
parent
commit
a8c4325a28
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      PHP/snowdrift.c

+ 2
- 2
PHP/snowdrift.c 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;


Loading…
Cancel
Save