Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.sbin/sa (main.c:1.23)



On Tue, Apr 28, 2009 at 11:51:02AM +1000, Geoff Wing wrote:
  | On Saturday 2009-04-18 13:37 +0000, Luke Mewburn caused:
  | :Module Name:       src
  | :Committed By:      lukem
  | :Date:              Sat Apr 18 13:37:05 UTC 2009
  | :Modified Files:
  | :   src/usr.sbin/sa: main.c pdb.c
  | :Log Message:
  | :Fix WARNS=4 issues (-Wcast-qual -Wsign-compare).
  | :XXX: could improve parsing of -v option and store "cutoff" as a uint64_t.
  | :To generate a diff of this commit:
  | :cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sa/main.c
  | 
  | ------------------------------------------------------------
  | @@ -76,7 +76,7 @@
  |  int Kflag, lflag, mflag, qflag, rflag, sflag, tflag, uflag, vflag;
  |  int cutoff = 1;
  |  
  | -static char        *dfltargv[] = { _PATH_ACCT };
  | +static char        *dfltargv[] = { __UNCONST(_PATH_ACCT), 0 };
  |  static int dfltargc = (sizeof(dfltargv)/sizeof(char *));
  |  
  |  /* default to comparing by sum of user + system time */
  | ------------------------------------------------------------
  | 
  | This is a functional change.  You added an element to dfltargv
  | which changed the dfltargc value so that it processes too many
  | values.  Also, I don't know why you did __UNCONST there except
  | that it was easiest.  The dfltargv/dfltargc are constant so maybe
  | something like the following is appropriate.

Good catch; I've committed your change

Luke.

Attachment: pgppP6hM_CXfN.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index