From owner-svn-src-stable-10@freebsd.org Mon Jan 9 05:58:49 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8D5ECA5A82; Mon, 9 Jan 2017 05:58:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B78091971; Mon, 9 Jan 2017 05:58:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v095wm0p004330; Mon, 9 Jan 2017 05:58:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v095wmEg004329; Mon, 9 Jan 2017 05:58:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701090558.v095wmEg004329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 9 Jan 2017 05:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r311753 - stable/10/usr.sbin/pstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 05:58:50 -0000 Author: delphij Date: Mon Jan 9 05:58:48 2017 New Revision: 311753 URL: https://svnweb.freebsd.org/changeset/base/311753 Log: 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. Modified: stable/10/usr.sbin/pstat/pstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pstat/pstat.c ============================================================================== --- stable/10/usr.sbin/pstat/pstat.c Mon Jan 9 05:57:31 2017 (r311752) +++ stable/10/usr.sbin/pstat/pstat.c Mon Jan 9 05:58:48 2017 (r311753) @@ -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");