Reduce the scope of a variable, and remove pointless memset (the same stuff gets memcpy'd on the very next line)