msi: Avoid dead code in parse_prop (Coverity)

Frédéric Delanoy frederic.delanoy at gmail.com
Sun Jan 29 16:25:40 CST 2012


count != 0 when arriving at line 236, so 'in_quote = 0' (true branch) is never executed

One can only get to line 236 from state_token or state_quote, which already quit the function when
reading a space (i.e. changing to state_whitespace) and count == 0

CID 1465
---
 dlls/msi/action.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 665ca63..663a917 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -233,8 +233,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
                 break;
             default:
                 state = state_token;
-                if (!count) in_quotes = 0;
-                else in_quotes = 1;
+                in_quotes = 1;
                 len++;
                 break;
             }
-- 
1.7.8.3




More information about the wine-patches mailing list