Correct snprintf() usage