[vlc-devel] [patch] init getline len

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Feb 22 17:14:25 CET 2018


On Thu, Feb 22, 2018, at 5:12 PM, Rémi Denis-Courmont wrote:
> Le 20 février 2018 07:10:48 GMT+02:00, jnqnfe at gmail.com a écrit :
> >patch: per getline (3), len should be init'd to 0
> >
> >not that it matters, but correct usage is correct usage
> 
> getline(3) actually states that *len is ignored if the buffer pointer is NULL.
> -- 
> Remi Denis-Courmont
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

My local man states «If *lineptr is set to NULL and *n is set 0 before the call, then getline() will allocate a buffer for storing the line.»

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list