Type casting in malloc() call