C marco and func: fix a bug