prefer snprintf() to sprintf(); this fixes a build warning on OpenBSD

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>