Date: Mon, 26 Dec 2016 17:34:28 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310611 - head/usr.sbin/pstat Message-ID: <201612261734.uBQHYS2x022120@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Mon Dec 26 17:34:27 2016 New Revision: 310611 URL: https://svnweb.freebsd.org/changeset/base/310611 Log: - 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. MFC after: 2 weeks Modified: head/usr.sbin/pstat/pstat.c Modified: head/usr.sbin/pstat/pstat.c ============================================================================== --- head/usr.sbin/pstat/pstat.c Mon Dec 26 17:26:25 2016 (r310610) +++ head/usr.sbin/pstat/pstat.c Mon Dec 26 17:34:27 2016 (r310611) @@ -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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612261734.uBQHYS2x022120>