<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 5, 2019 at 11:56 PM Alexandre Julliard <<a href="mailto:julliard@winehq.org">julliard@winehq.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Michael Stefaniuc <<a href="mailto:mstefani@winehq.org" target="_blank">mstefani@winehq.org</a>> writes:<br>
<br>
> On 2/5/19 9:02 AM, Isira Seneviratne wrote:<br>
>> <br>
>> <br>
>> On Tue, Feb 5, 2019 at 1:26 PM Nikolay Sivov <<a href="mailto:nsivov@codeweavers.com" target="_blank">nsivov@codeweavers.com</a><br>
>> <mailto:<a href="mailto:nsivov@codeweavers.com" target="_blank">nsivov@codeweavers.com</a>>> wrote:<br>
>> <br>
>>     I don't think hardcoded sizes like that are better, because you'll<br>
>>     always need to double check with actual string.<br>
>> <br>
>> What is there to double check, though? It seems to be fairly straight<br>
>> forward.<br>
> Magic constants are bad, one has to follow the code flow to figure it<br>
> out. Afair we even had a janitorial task to remove magic constants.<br>
><br>
> If you still want to get rid of the strlen do it like Alex Henri did and<br>
> use: ARRAY_SIZE(wstr) - 1.<br>
<br>
Frankly, keeping strlen() is fine. At least it's not worth doing a large<br>
scale search & replace job for this (much to your dismay I'm sure...)<br></blockquote><div> </div><div>Oh, okay. Thank you for the information. It's not a big deal for me :)<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-- <br>
Alexandre Julliard<br>
<a href="mailto:julliard@winehq.org" target="_blank">julliard@winehq.org</a><br>
</blockquote></div></div>