remove needless memset, since sprintf add trailing nul byte