qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Introduce NBD named exports.


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH] Introduce NBD named exports.
Date: Wed, 25 Aug 2010 11:35:00 +0200

>Am 25.08.2010 00:21, schrieb Laurent Vivier:
>> Le mardi 24 août 2010 à 10:59 +0200, Kevin Wolf a écrit :
>[...]
>
>>> Maybe using strlen(EN_OPTSTR) would be clearer? At first I missed the
>>> fact that sizeof includes the null byte, but maybe it's just me.
>> 
>> I think sizeof() is resolved at compile time whereas strlen() it is at
>> runtime. For me, it is better, it is like to have a constant.
>
>gcc is smart enough to make strlen of a literal string a constant, too.
>Besides, opening a connection isn't really performance critical.
>

Yes, you're right, I should check this before. So strlen() is better.

Regards,
Laurent

-- 
--------------------- address@hidden  ---------------------
"Tout ce qui est impossible reste à accomplir"    Jules Verne
"Things are only impossible until they're not" Jean-Luc Picard



reply via email to

[Prev in Thread] Current Thread [Next in Thread]