On Thu, 20 Jan 2011, Leif Middelschulte wrote:

> Hey,
>
> actually I used strncpy to be as restrictive as possible since n is
> given. But it's more a habit than a necessity in this case.
>
> According to http://cgit.freedesktop.org/~keithp/libXrandr/tree/src/XrrMode.c
> the mode name is NULL-terminated.
> So feel free to alter it as you wish in this case.

well, for me strndup is when you want a string to be short enough. Here, I 
think it is not the case, so a strdup should be sufficient. The length is 
just cached (so that strlen is not needed, i guess) and we duplicate the 
name.

I'll change that

Vincent

>
> BR,
>
> Leif
>
> 2011/1/20 Lucas De Marchi <lucas.demar...@profusion.mobi>:
>> On Thu, Jan 20, 2011 at 4:30 AM, Vincent Torri <vto...@univ-evry.fr> wrote:
>>>
>>> Hey,
>>>
>>> in that file, strndup is used. This function does not exist on mac os X,
>>> hence e17 fails.
>>>
>>> I'm wondering if strdup is not sufficient in that case. Leif, can you
>>> check, please ?
>>
>> Why? It's pretty easy to have an adhoc implementation if it's not available.
>>
>>
>> Lucas De Marchi
>>
>> ------------------------------------------------------------------------------
>> Protect Your Site and Customers from Malware Attacks
>> Learn about various malware tactics and how to avoid them. Understand
>> malware threats, the impact they can have on your business, and how you
>> can protect your company and customers by using code signing.
>> http://p.sf.net/sfu/oracle-sfdevnl
>> _______________________________________________
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>
>

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to