(var_is_valid_name) Fix three msg() bugs found by -Wformat.