fixed the type of second parameter of memset()