simplify embryo_init() and embryo_shutdown() a bit

SVN revision: 42957
This commit is contained in:
Vincent Torri 2009-10-08 06:35:48 +00:00
parent 7902ce1bb7
commit 2d88e6ebad
1 changed files with 4 additions and 4 deletions

View File

@ -31,8 +31,8 @@ static int _embryo_init_count = 0;
EAPI int
embryo_init(void)
{
_embryo_init_count++;
if (_embryo_init_count > 1) return _embryo_init_count;
if (++_embryo_init_count != 1)
return _embryo_init_count;
srand(time(NULL));
@ -48,8 +48,8 @@ embryo_init(void)
EAPI int
embryo_shutdown(void)
{
_embryo_init_count--;
if (_embryo_init_count > 0) return _embryo_init_count;
if (--_embryo_init_count != 0)
return _embryo_init_count;
return _embryo_init_count;
}