[FFmpeg-devel] [PATCH] Properly handle cookies that specify sub-domain where the URL.

Michael Niedermayer michaelni at gmx.at
Wed Jan 22 16:25:29 CET 2014


On Wed, Jan 22, 2014 at 02:36:16PM +0000, Eli Kara wrote:
> 
> >> Yes, you could write:
> >> 
> >> Int leading_dot = (param[7] == '.');
> >> 
> >> But technically, the result of the expression is a boolean, not an 
> >> int.
> 
> > While I don't remember the C boolean type, I just wanted to note that the variable is only used once and therefore probably unneeded.
> 
> > Please remove the tabs and consider to shorten the comment lines.
> 
> You don't remember it because it doesn't exist (smiles). I did check the C standard and it clearly states that relational operators return 1 or 0 with type int,
> so my comment is relevant to C++ only, sorry about that.
> 
> I still think it is clearer with the leading_dot variable. You could place the statement inside the call to av_strdup but that would look unintelligible IMO.
> The other alternative would be another if or conditional statement.
> 
> I'll wait a while longer to see if anyone else has any comments on this..

IMHO feel free to leave the variable in there

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140122/2ed9ce28/attachment.asc>


More information about the ffmpeg-devel mailing list