common: clean cmd.c