[slang-users] Suspicious code in slang-2.0.5
Vladimir Nadvornik
nadvornik at suse.cz
Mon Jan 30 11:39:10 EST 2006
Hi,
We got this bugreport from David Binderman <dcb314 at hotmail.com>:
I just tried to compile package slang-2.0.5-3 with the Intel C compiler.
It said
/usr/src/packages/BUILD/slang-2.0.5/src/slcommon.c(107): warning #187: use of
"=" where "==" may have been intended
/usr/src/packages/BUILD/slang-2.0.5/src/slcommon.c(108): warning #187: use of
"=" where "==" may have been intended
/usr/src/packages/BUILD/slang-2.0.5/src/slcommon.c(109): warning #187: use of
"=" where "==" may have been intended
The source code is
if (((locale == NULL) || (*locale == 0))
&& ((NULL == (locale = getenv ("LC_ALL"))) || (*locale = 0))
&& ((NULL == (locale = getenv ("LC_CTYPE"))) || (*locale = 0))
&& ((NULL == (locale = getenv ("LANG"))) || (*locale = 0)))
return 0;
Maybe the programmer intended
if (((locale == NULL) || (*locale == 0))
&& ((NULL == (locale = getenv ("LC_ALL"))) || (*locale == 0))
&& ((NULL == (locale = getenv ("LC_CTYPE"))) || (*locale == 0))
&& ((NULL == (locale = getenv ("LANG"))) || (*locale == 0)))
return 0;
--
Vladimir Nadvornik
developer
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: nadvornik at suse.cz
Drahobejlova 27 tel:+420 2 9654 2373
190 00 Praha 9 fax:+420 2 9654 2374
Ceska republika http://www.suse.cz
More information about the slang-users-l
mailing list