Hi all,

This patch does the following:
- Removes references to the -h flag, which was removed from radiusctl(8)
  a while ago.
- When in main(), use `return' instead of exit(3), which reduces the
  size of radiusctl a bit.  I find this more elegant, but that's subjective,
  so please feel free to just apply the first part of the patch.

Regards,
Michael


Index: radiusctl.8
===================================================================
RCS file: /cvs/src/usr.sbin/radiusctl/radiusctl.8,v
retrieving revision 1.2
diff -u -p -r1.2 radiusctl.8
--- radiusctl.8 3 Aug 2015 07:45:05 -0000       1.2
+++ radiusctl.8 24 Aug 2015 18:58:47 -0000
@@ -23,7 +23,6 @@
 .Nd control the RADIUS protocol daemon
 .Sh SYNOPSIS
 .Nm
-.Op Fl h
 .Ar command
 .Op Ar argument ...
 .Sh DESCRIPTION
Index: radiusctl.c
===================================================================
RCS file: /cvs/src/usr.sbin/radiusctl/radiusctl.c,v
retrieving revision 1.3
diff -u -p -r1.3 radiusctl.c
--- radiusctl.c 3 Aug 2015 07:49:05 -0000       1.3
+++ radiusctl.c 24 Aug 2015 18:58:47 -0000
@@ -46,7 +46,7 @@ usage(void)
 {
        extern char *__progname;
 
-       fprintf(stderr, "usage: %s [-h] command [argument ...]\n", __progname);
+       fprintf(stderr, "usage: %s command [argument ...]\n", __progname);
 }
 
 int
@@ -59,13 +59,13 @@ main(int argc, char *argv[])
                switch (ch) {
                default:
                        usage();
-                       exit(EX_USAGE);
+                       return (EX_USAGE);
                }
        argc -= optind;
        argv += optind;
 
        if ((result = parse(argc, argv)) == NULL)
-               exit(EXIT_FAILURE);
+               return (EXIT_FAILURE);
 
        switch (result->action) {
        case NONE:
@@ -75,7 +75,7 @@ main(int argc, char *argv[])
                break;
        }
 
-       exit(EXIT_SUCCESS);
+       return (EXIT_SUCCESS);
 }
 
 static void

Reply via email to