Remove a bunch of unnecessary memset that are immediately followed by a memcpy; the memcpy is going to overwrite anything in that memory location, so the memset is pointless.