- use char where possible
- avoid comma operator
- remove 'lint' support
- add attribute noreturn
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 14169 Build 14338: arc lint + arc unit
Event Timeline
| usr.bin/xstr/xstr.c | ||
|---|---|---|
| 139–140 | Pull up the else, or just remove it entirely as the result is the same either way (readstd ends up equal to zero). | |
| 235 | This is unnecessary and forces the compiler to ensure that all arithemetic is done modulo 256, which may increase the code size. | |
| 276–278 | This can also be written more legibly as c = c << 3 + *cp++ - '0'; | |
| 319 | c must be an int for EOF detection to work reliably. | |
| usr.bin/xstr/xstr.c | ||
|---|---|---|
| 319 | you're right. I forgot about this :\ | |
Comment Actions
I'm sorry for the lack of response, I thought this had landed already.
Upon closer inspection, I think I was mistaken about readstd, and the assignment to 0 is necessary. Have you tested all three possible cases (dash only, filenames only, both dash and filenames)?