refactoring making flags string in cluster.c

refactoring making flags string to add flags easily.

and if flags == 0, it doesn't need to add ","