- 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 Not Applicable - Unit
Tests Not Applicable
Event Timeline
usr.bin/ypwhich/ypwhich.c | ||
---|---|---|
209 ↗ | (On Diff #7897) | 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–209 ↗ | (On Diff #7900) | 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 ↗ | (On Diff #7900) | This doesn't look right. Can you check the logic here? |
usr.bin/ypwhich/ypwhich.c | ||
---|---|---|
172 ↗ | (On Diff #7900) | Never mind, I read it wrong, this logic is right. |