Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jan 2017 05:57:31 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r311752 - stable/11/usr.sbin/pstat
Message-ID:  <201701090557.v095vVFW004236@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Mon Jan  9 05:57:31 2017
New Revision: 311752
URL: https://svnweb.freebsd.org/changeset/base/311752

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/11/usr.sbin/pstat/pstat.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/pstat/pstat.c
==============================================================================
--- stable/11/usr.sbin/pstat/pstat.c	Mon Jan  9 05:52:30 2017	(r311751)
+++ stable/11/usr.sbin/pstat/pstat.c	Mon Jan  9 05:57:31 2017	(r311752)
@@ -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?201701090557.v095vVFW004236>