Removing unneeded memcpy in readRecord()