> The goto seems uncalled for. An ordinary if does the job equally well. > Also, I wonder if a mode variable isn't just as simple as the flg array. Good catches. I probably went through 10 permutations of argument parsing until I found the current one, so I'm not surprised that I missed some simplification
> Proposed patch attached. Is (argc != (mode == 'c')) too clever? Thanks, the patch is an improvement over my initial code. That expression is entirely acceptable. > By the way, what is the purpose of strlcpy in xt and unarchive? > Is it in case header fields are not properly zero terminated? Precisely. Although the tar format requires null-termination, I wanted to be sure that malformed archives couldn't be evil.