Adjust integer types in calls to "snprintf"

Changed "%d" to "%ld" in a couple of calls to "snprintf" and removed a
few undesirable (or unnecessary) "int" type casts.