[PATCH 2/3] winex11: Don't recompute string length in remove_startup_notification.
Alex Henrie
alexhenrie24 at gmail.com
Tue Jan 19 00:52:11 CST 2016
The string length was computed during the loop earlier in the function.
There is no need to call the O(n) strlen function to compute it again.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
dlls/winex11.drv/window.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 4a047e2..5c7947e 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -144,7 +144,7 @@ static void remove_startup_notification(Display *display, Window window)
xevent.xclient.format = 8;
src = message;
- srclen = strlen(src) + 1;
+ srclen = pos;
while (srclen > 0)
{
--
2.7.0
More information about the wine-patches
mailing list