- 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 14326 Build 14484: arc lint + arc unit
Event Timeline
usr.bin/xstr/xstr.c | ||
---|---|---|
138–139 | Pull up the else, or just remove it entirely as the result is the same either way (readstd ends up equal to zero). | |
232 | This is unnecessary and forces the compiler to ensure that all arithemetic is done modulo 256, which may increase the code size. | |
273–274 | This can also be written more legibly as c = c << 3 + *cp++ - '0'; | |
314 | c must be an int for EOF detection to work reliably. |
usr.bin/xstr/xstr.c | ||
---|---|---|
314 | 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)?