svn commit: r296756 - stable/10/libexec/atrun

Garrett Cooper ngie at FreeBSD.org
Sat Mar 12 19:09:53 UTC 2016


Author: ngie
Date: Sat Mar 12 19:09:51 2016
New Revision: 296756
URL: https://svnweb.freebsd.org/changeset/base/296756

Log:
  MFC r295079:
  
  Fix the type for hw.ncpu, so sysctlbyname doesn't consistently fail on
  64-bit architectures where sizeof(int) != sizeof(size_t).
  
  PR: 206758

Modified:
  stable/10/libexec/atrun/atrun.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/libexec/atrun/atrun.c
==============================================================================
--- stable/10/libexec/atrun/atrun.c	Sat Mar 12 19:08:58 2016	(r296755)
+++ stable/10/libexec/atrun/atrun.c	Sat Mar 12 19:09:51 2016	(r296756)
@@ -459,8 +459,9 @@ main(int argc, char *argv[])
     int c;
     int run_batch;
 #ifdef __FreeBSD__
-    size_t ncpu, ncpusz;
+    size_t ncpusz;
     double load_avg = -1;
+    int ncpu;
 #else
     double load_avg = LOADAVG_MX;
 #endif


More information about the svn-src-all mailing list