Fix typo in C preprocessor undef
Delete redundant function