This should be program_name
or, ideally, merged back into the if (argc < 3)
check from whence it came.
The previous version of this wasn't pretty, but adopting an if (argc > 0) { program_name = argv[0]; ...
like dj(1) used to have would be consistent (these are both utilities that can run without arguments, but which take options) and efficient.
Why move this? It was more efficient before this changed. Anyone curious about the self-explanatory program_name
can just grep for it in the file.
The compiler will filter this if down to one condition anyway. Why are there two here? argc==0
isn't a special case with regards to intcmp(1), except that the program_name
fallback needs to be used.
I regard the harakit as art as well as code. Each utility should be simple, but also the best at what it does ("do one thing well"). Lost cycles add up. I don't care how small the issue is, I…
I can't add a second comment on the same line but program_name
should be set here to argv[0]
, which would be consistent with my suggested change to mm(1) and how dj(1) was before this patchset.
I didn't see it but this case is already covered on L189; if argc > 0 { program_name = argv[0]; ...