kernal32: change if...if to if...'else if' in get_module_path_end()

Hongbo Ni hongbo at njstar.com
Fri Aug 1 02:08:24 CDT 2008


If '\\' is found, there is no point to find '/'.

---
 dlls/kernel32/module.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index 86675b6..60667f9 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -704,9 +704,9 @@ static inline const WCHAR *get_module_path_end(const WCHAR *module)
     if (!module) return mod_end;
 
     if ((p = strrchrW( mod_end, '\\' ))) mod_end = p;
-    if ((p = strrchrW( mod_end, '/' ))) mod_end = p;
+    else if ((p = strrchrW( mod_end, '/' ))) mod_end = p;
     if (mod_end == module + 2 && module[1] == ':') mod_end++;
-    if (mod_end == module && module[0] && module[1] == ':') mod_end += 2;
+    else if (mod_end == module && module[0] && module[1] == ':') mod_end += 2;
 
     return mod_end;
 }
-- 





More information about the wine-patches mailing list