|
Bugzilla – Full Text Bug Listing |
| Summary: | slang-2.0.5-3: dodgy code | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE LINUX 10.0 | Reporter: | David Binderman <dcb314> |
| Component: | Basesystem | Assignee: | Vladimir Nadvornik <nadvornik> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Minor | ||
| Priority: | P5 - None | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | SUSE Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
The code really looks suspiciously. I sent this report to slang mailinglist. It was a bug and it will be fixed in upstream slang 2.0.6. I have fixed the SUSE package. |
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;