question about malloc attribute

Xi Ruoyao ryxi@stu.xidian.edu.cn
Tue May 9 04:22:00 GMT 2017


On 2017-05-08 20:48 +0530, Prathamesh Kulkarni wrote:
> The patch marks functions like lrealpath() and rtx_reader::read_until
> as malloc, which
> I am not sure is correct ?

They are correct.  They both put something in an allocated buffer and
return the pointer to the buffer.
-- 
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University



More information about the Gcc-help mailing list