C functions return PRIMESIEVE_ERROR on error