https://bugzilla.novell.com/show_bug.cgi?id=231137 ------- Comment #7 from lmichnovic@novell.com 2007-01-11 05:52 MST ------- I've got this reply from upstream: -- The comparison is a valid one. It's there to make sure that the font is freed, unless it's exactly the string literal, since literals can't be freed. If it has the same value as the literal value, but is allocated it still has to be freed. -- To your second question:
I fail to understand how - if fn is pointing at string "MonoSpace", then the result of the strcmp will be non zero.
Please look in the code. fn is initialized few lines above in the mentioned line and let assume that it is initialized to string "MonoSpace". But it is not the fallback font FLOCALE_FFT_FALLBACK_FONT. So comparison (fn != NULL && fn != FLOCALE_FFT_FALLBACK_FONT) is true because fn is not NULL and it is not pointing to fallback font. But comparison (fn != NULL && (strcmp( fn, FLOCALE_FFT_FALLBACK_FONT) !=0)) the fn is not NULL but strcmp will give a matching strings so it differs from previous comparison. And the fn will not be freed. This code works as it was intent. We can ignore the warning from compiler. Satisfied? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.