refactor print.c

add {} to one-statement if