[PATCH:libXfont 4/4] Remove redundant setting of 'len' in SPropRecValList_add_by_font_cap

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jan 7 23:35:28 PST 2014


Found by cppcheck 1.63:
[FreeType/xttcap.c:621] -> [FreeType/xttcap.c:624]: (performance)
 Variable 'len' is reassigned a value before the old one has been used.

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

diff --git a/src/FreeType/xttcap.c b/src/FreeType/xttcap.c
index 104dc89..cee752e 100644
--- a/src/FreeType/xttcap.c
+++ b/src/FreeType/xttcap.c
@@ -621,7 +621,6 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList,
                     int len = term-p-1;
                     char *value;
 
-                    len = term-p-1;
                     value=malloc(len+1);
                     memcpy(value, p+1, len);
                     value[len]='\0';
-- 
1.7.9.2



More information about the xorg-devel mailing list