Change a loop to memset and update a comment