< prev index next >

src/hotspot/os/bsd/os_bsd.cpp

Print this page
@@ -335,11 +335,11 @@
    // Note that the space for the colon and the trailing null are provided
    // by the nulls included by the sizeof operator.
    const size_t bufsize =
      MAX2((size_t)MAXPATHLEN,  // For dll_dir & friends.
           (size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + sizeof(SYS_EXT_DIR) + sizeof(EXTENSIONS_DIR)); // extensions dir
-   char *buf = (char *)NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
+   char *buf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
  
    // sysclasspath, java_home, dll_dir
    {
      char *pslash;
      os::jvm_path(buf, bufsize);

@@ -385,14 +385,14 @@
      // addressed).
      const char *v = ::getenv("LD_LIBRARY_PATH");
      const char *v_colon = ":";
      if (v == NULL) { v = ""; v_colon = ""; }
      // That's +1 for the colon and +1 for the trailing '\0'.
-     char *ld_library_path = (char *)NEW_C_HEAP_ARRAY(char,
-                                                      strlen(v) + 1 +
-                                                      sizeof(SYS_EXT_DIR) + sizeof("/lib/") + strlen(cpu_arch) + sizeof(DEFAULT_LIBPATH) + 1,
-                                                      mtInternal);
+     char *ld_library_path = NEW_C_HEAP_ARRAY(char,
+                                              strlen(v) + 1 +
+                                              sizeof(SYS_EXT_DIR) + sizeof("/lib/") + strlen(cpu_arch) + sizeof(DEFAULT_LIBPATH) + 1,
+                                              mtInternal);
      sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib/%s:" DEFAULT_LIBPATH, v, v_colon, cpu_arch);
      Arguments::set_library_path(ld_library_path);
      FREE_C_HEAP_ARRAY(char, ld_library_path);
    }
  

@@ -416,11 +416,11 @@
    // Note that the space for the colon and the trailing null are provided
    // by the nulls included by the sizeof operator.
    const size_t bufsize =
      MAX2((size_t)MAXPATHLEN,  // for dll_dir & friends.
           (size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + system_ext_size); // extensions dir
-   char *buf = (char *)NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
+   char *buf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
  
    // sysclasspath, java_home, dll_dir
    {
      char *pslash;
      os::jvm_path(buf, bufsize);

@@ -478,14 +478,14 @@
      // at all. To ease the transition from Apple's Java6 to OpenJDK7,
      // "." is appended to the end of java.library.path. Yes, this
      // could cause a change in behavior, but Apple's Java6 behavior
      // can be achieved by putting "." at the beginning of the
      // JAVA_LIBRARY_PATH environment variable.
-     char *ld_library_path = (char *)NEW_C_HEAP_ARRAY(char,
-                                                      strlen(v) + 1 + strlen(l) + 1 +
-                                                      system_ext_size + 3,
-                                                      mtInternal);
+     char *ld_library_path = NEW_C_HEAP_ARRAY(char,
+                                              strlen(v) + 1 + strlen(l) + 1 +
+                                              system_ext_size + 3,
+                                              mtInternal);
      sprintf(ld_library_path, "%s%s%s%s%s" SYS_EXTENSIONS_DIR ":" SYS_EXTENSIONS_DIRS ":.",
              v, v_colon, l, l_colon, user_home_dir);
      Arguments::set_library_path(ld_library_path);
      FREE_C_HEAP_ARRAY(char, ld_library_path);
    }
< prev index next >