svn commit: r286266 - head/usr.bin/ypmatch
Ed Schouten
ed at nuxi.nl
Sun Aug 9 11:51:28 UTC 2015
Hi Marcelo,
2015-08-04 4:34 GMT+02:00 Marcelo Araujo <araujo at freebsd.org>:
> Sync the code with the OpenBSD version.
That's a shame. It looks like improvements that we made to our version
have been undone because of this.
> -static void
> +void
> usage(void)
This function could be static.
> + fprintf(stderr,
> + "where\n"
> + "\tmapname may be either a mapname or a nickname for a map.\n"
> + "\t-k prints keys as well as values.\n"
> + "\t-t inhibits map nickname translation.\n"
> + "\t-x dumps the map nickname translation table.\n");
It is fairly uncommon for BSD utilities to have an extensive help
output. Man pages are intended for that purpose.
> - while ((c = getopt(argc, argv, "xd:kt")) != -1)
> + while ((c=getopt(argc, argv, "xd:kt")) != -1)
> switch (c) {
> case 'x':
> - for (i = 0; i<sizeof ypaliases/sizeof ypaliases[0]; i++)
> + for (i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++)
> ...
> - if ((argc-optind) < 2)
> + if ((argc-optind) < 2 )
> ...
> - if (!domainname)
> + if (!domainname) {
> yp_get_default_domain(&domainname);
> + }
Though the style(9) conformance of tool wasn't ideal, this change made it worse.
--
Ed Schouten <ed at nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK/VAT number: 62051717
More information about the svn-src-all
mailing list