slang-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] Suspicious code in slang-2.0.5


Hi,

We got this bugreport from David Binderman <dcb314@xxxxxxxxxxx>:

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@xxxxxxx
Drahobejlova 27                             tel:+420 2 9654 2373 
190 00 Praha 9                              fax:+420 2 9654 2374   
Ceska republika                             http://www.suse.cz    

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]