[vlc-devel] [vlc-commits] FromLocaleDup(): accept NULL input (and return NULL)

Rémi Denis-Courmont remi at remlab.net
Tue Aug 30 08:28:03 CEST 2011


On Tue, 30 Aug 2011 05:31:06 +0200 (CEST), git at videolan.org (Rafaël Carré)
wrote:
> vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Mon Aug
29
> 22:07:25 2011 -0400| [3ab2f937b7f2dbd77e4cd161ef926ecb07dc147b] |
> committer: Rafaël Carré
> 
> FromLocaleDup(): accept NULL input (and return NULL)

I don't really like this. I much prefer the same pattern as strdup().
Reworking the code is much easier when you know that the caller cannot pass
NULL.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list