From fb14276b41b7d40dbbb36ae3a50503920cf9df26 Mon Sep 17 00:00:00 2001 From: delphij Date: Mon, 9 Jan 2017 05:58:48 +0000 Subject: [PATCH] MFC r310611: - pstat(8) does not accept any arguments other than getopt() args, so don't bother to adjust argc/argv after getopt() loop. - Make a string pointer constant. git-svn-id: svn://svn.freebsd.org/base/stable/10@311753 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.sbin/pstat/pstat.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 201784157..b5ceb2e7c 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -174,8 +174,6 @@ main(int argc, char *argv[]) default: usage(); } - argc -= optind; - argv += optind; /* * Initialize symbol names list. @@ -339,7 +337,7 @@ static void ttyprt(struct xtty *xt) { int i, j; - char *name; + const char *name; if (xt->xt_size != sizeof *xt) errx(1, "struct xtty size mismatch"); -- 2.45.0