Warning about malloc() in directory listing