On Sun, 8 Nov 2015 22:20:33 +0100
Benjamin Baier <[email protected]> wrote:
> This patch brings npppd(8)'s option parsing in sync with all the
> other userland utils that don't recognize -h for help/usage (except
> for some games, still).
>
> Also exit(3) at the end of the usage() function and mark it as __dead.
Committed with some additional tweaks below.
Thanks,
--- npppd.c-bak Mon Nov 9 10:11:45 2015
+++ npppd.c Mon Nov 9 10:12:12 2015
@@ -98,7 +98,7 @@ static npppd s_npppd; /* singleton */
static void npppd_reload0 (npppd *);
static void npppd_update_pool_reference (npppd *);
static int npppd_rd_walktree_delete(struct radish_head *);
-static void usage (void);
+static __dead void usage (void);
static void npppd_stop_really (npppd *);
static uint32_t str_hash(const void *, int);
static void npppd_on_sighup (int, short, void *);
@@ -163,9 +163,8 @@ main(int argc, char *argv[])
}
argc -= optind;
argv += optind;
- if (argc != 0) {
+ if (argc != 0)
usage();
- }
if (nflag) {
debuglevel++;
runasdaemon = 0;