evas/cserve2: fix SIGFPE in expedite test case.

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
This commit is contained in:
Jean-Philippe Andre 2013-06-04 19:51:13 +09:00 committed by Cedric Bail
parent 5836f503e1
commit 6531423fd7
1 changed files with 5 additions and 2 deletions

View File

@ -395,9 +395,12 @@ end:
static unsigned int
_font_slave_int_shm_prev_calculate(unsigned int size, unsigned int nglyphs)
{
unsigned int average = size / nglyphs;
unsigned int average;
unsigned int newsize;
if (!nglyphs) return cserve2_shm_size_normalize(1);
average = size / nglyphs;
newsize = MIN_GLYPHS * average;
newsize = cserve2_shm_size_normalize(newsize);
@ -530,7 +533,7 @@ _font_slave_glyphs_load(const void *cmddata, void *data EINA_UNUSED)
if (!r) // SHM is full
{
fi->shmsize = _font_slave_int_shm_prev_calculate
(c->usage, total_glyphs);
(c->usage, total_glyphs);
c = NULL;
continue;
}