[PATCH 1/2] cmd: Use terminated strings in WCMD_ReadAndParseLine()

Gijs Vermeulen gijsvrm at gmail.com
Wed Apr 14 04:42:09 CDT 2021


Op wo 14 apr. 2021 om 07:21 schreef Hugh McMaster <hugh.mcmaster at outlook.com
>:

> While the sizeof() calculations in the ARRAY_SIZE() macro occur at
> compile-time (meaning no cost), lstrlenW() and friends are highly
> optimized for speed. Some implementations of strlen() are even written
> in assembly for even more speed.
>
> Given the string lengths being checked seem to be <= 5, any cost is
> extremely minimal at best.
>

Understood.


> I'm not sure if anyone else has any thoughts on this, but I still
> think calculating string length in WCMD_keyword_ws_found() will work
> better.
>

I will just rework the series to do this instead. Thanks for all the
comments/reviews.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210414/62a748cf/attachment.htm>


More information about the wine-devel mailing list