Bug 110743
| Summary: | possibly broken source code | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | d.binderman |
| Component: | epic | Assignee: | Jeremy Katz <katzj> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 1 | CC: | d.binderman |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2003-11-25 15:18:33 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This is, although baroque and disgusting, exactly what's intended. When 'g' is the letter, it wants to set the context as global for any function getting called.
Would it be possible to rewrite code to be more clear,
so that other folks don't fall into the same trap I did ?
Something like
while (((*word == 'r') && ((variable = 1) != 0))
|| ((*word == 'g') && ((global = 1) != 0))
|| ((*word == 'i') && ((func = stristr) != 0)))
word++;
Please make any such requests upstream. Not being the upstream maintainers of the software, making cosmetic changes to the code is not viable. |
From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Description of problem: I just tried to compile package epic-1_0_1-15 from Fedora. The compiler said functions.c(4205): warning #187: use of "=" where "==" may have been intended functions.c(4205): warning #187: use of "=" where "==" may have been intended The source code is while (((*word == 'r') && (variable = 1)) || ((*word == 'g') && (global = 1)) || ((*word == 'i') && (func = stristr))) word++; Better source code might be while (((*word == 'r') && (variable == 1)) || ((*word == 'g') && (global == 1)) || ((*word == 'i') && (func == stristr))) { word++; } Version-Release number of selected component (if applicable): epic-1_0_1-15 How reproducible: Always Steps to Reproduce: 1. by inspection of source code 2. 3. Additional info: