On 02/20/09 20:50, Scott Rotondo wrote: > I don't see anything that won't work correctly, but here are a few > suggestions to make it easier to follow the program logic. > > 1. If you initialize authname to NULL, you don't need a second variable > (haveauth) to track whether -a has been used. You can still check for > mulitple uses of -a during getopt() processing:
Done. > 2. You can reuse the existing (somewhat complex) code that deals with > argc == 1, 2, or >2 by using the standard idiom Done. > 3. The code from approx. line 103-126 should be pulled out into a > function that can also be called from show_auths() and get_default_auths(). Done. I've removed the username check from get_default_auths() as that (now) only gets called from within show_auths which itself has already done the username validation. > 4. This is not related to your changes, but I don't see why the calls to > get_default_auths() and free_auths() shouldn't be inside show_auths(). Done. On 02/20/09 20:04, John Zolnowsky x69422/408-404-5064 wrote: > That looks much better. I think CLIP compliance was expected. > > Cstyle nit, lines 89-95: case statements should be aligned with the > enclosing switch statement. Fixed. Updated code at http://cr.opensolaris.org/~bartbl/6251549/ ; testing output at http://cr.opensolaris.org/~bartbl/6251549-testing/. Thanks, Bart