svn commit: r185940 - head/sys/sys

Ed Schouten ed at FreeBSD.org
Thu Dec 11 10:32:05 PST 2008


Author: ed
Date: Thu Dec 11 18:32:05 2008
New Revision: 185940
URL: http://svn.freebsd.org/changeset/base/185940

Log:
  Don't forget to add "npts" to rlimit_ident[] as well.
  
  When I added RLIMIT_NPTS, I forgot to add it to rlimit_ident[]. Make
  sure the rlimit_ident[] array is always RLIM_NLIMITS elements big. So if
  we ever forget to add new rlimits to this list again. it will contain a
  null pointer, instead of random data.
  
  Spotted by:	rwatson

Modified:
  head/sys/sys/resource.h

Modified: head/sys/sys/resource.h
==============================================================================
--- head/sys/sys/resource.h	Thu Dec 11 18:07:54 2008	(r185939)
+++ head/sys/sys/resource.h	Thu Dec 11 18:32:05 2008	(r185940)
@@ -106,7 +106,7 @@ struct rusage {
  */
 
 #ifdef _RLIMIT_IDENT
-static char *rlimit_ident[] = {
+static char *rlimit_ident[RLIM_NLIMITS] = {
 	"cpu",
 	"fsize",
 	"data",
@@ -118,6 +118,7 @@ static char *rlimit_ident[] = {
 	"nofile",
 	"sbsize",
 	"vmem",
+	"npts",
 };
 #endif
 


More information about the svn-src-all mailing list