- Use nitems instead of "sizeof ypaliases/sizeof ypaliases[0]".
- Prefer more expressive statement like: if (notrans == 0).
- Also remove the brakets around !notrans inside the for().
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 60 Build 60: arc lint + arc unit
Event Timeline
usr.bin/ypwhich/ypwhich.c | ||
---|---|---|
209 | This should also be notrans == 0 then as well, right? But that said, in this case we only use notrans as a boolean. If you want, we could just #include <stdbool.h> and turn it into a bool. :-) |
usr.bin/ypwhich/ypwhich.c | ||
---|---|---|
208–211 | In this case here, it could be changed to a bool. Other yp(8) tools use the same approach, but, I will add it in my todo list. I do believe it would be good maybe move notrans to a bool. But I would like to do it in a next step. |
usr.bin/ypwhich/ypwhich.c | ||
---|---|---|
172 | This doesn't look right. Can you check the logic here? |
usr.bin/ypwhich/ypwhich.c | ||
---|---|---|
172 | Never mind, I read it wrong, this logic is right. |