[PATCH:libfontenc] Initialize both value1 & value2, not value1 twice

Alan Coopersmith alan.coopersmith at oracle.com
Thu Dec 26 09:50:08 PST 2013


Flagged by cppcheck 1.62:
[src/encparse.c:303] -> [src/encparse.c:303]: (performance, inconclusive)
 Variable 'value1' is reassigned a value before the old one has been used
 if variable is no semaphore variable.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 src/encparse.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/encparse.c b/src/encparse.c
index ee18b3f..d10634d 100644
--- a/src/encparse.c
+++ b/src/encparse.c
@@ -300,7 +300,7 @@ getnextline(FontFilePtr f)
             }
         } else if(!strcasecmp(keyword_value, "STARTMAPPING")) {
             keyword_value[0] = 0;
-            value1 = 0; value1 = 0;
+            value1 = 0; value2 = 0;
             /* first a keyword */
             token = gettoken(f,c,&c);
             if(token != KEYWORD_TOKEN) {
-- 
1.7.9.2



More information about the xorg-devel mailing list