[vlc-devel] [PATCH 4/9] raop: Implement options for password

Michael Hanselmann public at hansmi.ch
Mon Jul 27 13:55:48 CEST 2009


On Mon, Jul 27, 2009 at 10:37 AM, <jpd at videolan.org> wrote:
> On Sun, Jul 26, 2009 at 12:01:48AM +0200, Michael Hanselmann wrote:
>> On Fri, Jul 24, 2009 at 11:41 AM, <jpd at videolan.org> wrote:
>> > On Fri, Jul 24, 2009 at 11:24:59AM +0200, Michael Hanselmann wrote:
>> >> So, the strsep(3) call in my patch just replaces the first occurence
>> >> of "\r" or "\n" after the password.
>> >
>> > Right. But you would only need "\n" if the file is opened in "text"
>> > mode. And in that case, strlen()-1 would do equally well to find the
>> > newline if it's there.
>>
>> It's not equally well. The function should just return the first line,
>> not just remove the last newline.
>
> Isn't that, minus the removing of the newline, what fgets() does anyway?

Oh, you're right. I keep confusing fread(3) and fgets(3). Do you want
any further changes on this patch?

Regards,
Michael

-- 
http://hansmi.ch/



More information about the vlc-devel mailing list