summaryrefslogtreecommitdiff
path: root/java/jdk16/files/patch-j2se::bin::java_md.c
blob: 3b8c8a276cfef5e0e66c973e2cdff4f1e9e41788 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- ../../j2se/src/solaris/bin/java_md.c.orig	Fri May 25 21:49:14 2007
+++ ../../j2se/src/solaris/bin/java_md.c	Wed May 30 17:00:23 2007
@@ -1060,8 +1060,9 @@
 
 #if defined(_ALLBSD_SOURCE)
 
-  uint64_t result;
-  int mib[2], rlen;
+  unsigned long result;
+  int mib[2];
+  size_t rlen;
 
   /* fetch sysctl(hw.physmem) value */
   mib[0] = CTL_HW;
@@ -1342,10 +1343,11 @@
 
 #if defined(_ALLBSD_SOURCE)
 
-  unsigned long result, sys_processors;
-  int mib[2], rlen;
+  unsigned long sys_processors;
+  int mib[2], result;
+  size_t rlen;
 
-  /* fetch sysctl(hw.physmem) value */
+  /* fetch sysctl(hw.ncpu) value */
   mib[0] = CTL_HW;
   mib[1] = HW_NCPU;
   rlen = sizeof(result);
@@ -1354,7 +1356,7 @@
 	result = 1;
 
   if (_launcher_debug) {
-    printf("sysctl(hw.ncpu): %lu\n", result);
+    printf("sysctl(hw.ncpu): %d\n", result);
   }
 
   sys_processors = result;
@@ -1635,7 +1637,7 @@
     while (dp != NULL) {
 	cp = strchr(dp, (int)':');
 	if (cp != NULL)
-	    *cp = (char)NULL;
+	    *cp = '\0';
 	if ((target = ProcessDir(info, dp)) != NULL)
 	    break;
 	dp = cp;