[PATCH] cryptui: Avoid calling strlen on a constant.
isirasen96 at gmail.com
Tue Feb 5 19:27:04 CST 2019
On Tue, Feb 5, 2019 at 11:56 PM Alexandre Julliard <julliard at winehq.org>
> Michael Stefaniuc <mstefani at winehq.org> writes:
> > On 2/5/19 9:02 AM, Isira Seneviratne wrote:
> >> On Tue, Feb 5, 2019 at 1:26 PM Nikolay Sivov <nsivov at codeweavers.com
> >> <mailto:nsivov at codeweavers.com>> wrote:
> >> I don't think hardcoded sizes like that are better, because you'll
> >> always need to double check with actual string.
> >> What is there to double check, though? It seems to be fairly straight
> >> forward.
> > Magic constants are bad, one has to follow the code flow to figure it
> > out. Afair we even had a janitorial task to remove magic constants.
> > If you still want to get rid of the strlen do it like Alex Henri did and
> > use: ARRAY_SIZE(wstr) - 1.
> Frankly, keeping strlen() is fine. At least it's not worth doing a large
> scale search & replace job for this (much to your dismay I'm sure...)
Oh, okay. Thank you for the information. It's not a big deal for me :)
> Alexandre Julliard
> julliard at winehq.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wine-devel