Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/java.base/share/native/libjli/java.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ static void
SetMainModule(const char *s)
{
static const char format[] = "-Djdk.module.main=%s";
char* slash = JLI_StrChr(s, '/');
const char* slash = JLI_StrChr(s, '/');
size_t s_len, def_len;
char *def;

Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/native/libjli/jli_util.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -87,7 +87,7 @@ JLI_MemFree(void *ptr)
jboolean
JLI_HasSuffix(const char *s1, const char *s2)
{
char *p = JLI_StrRChr(s1, '.');
const char* p = JLI_StrRChr(s1, '.');
if (p == NULL || *p == '\0') {
return JNI_FALSE;
}
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/native/libverify/check_code.c
Original file line number Diff line number Diff line change
Expand Up @@ -3842,7 +3842,7 @@ signature_to_fieldtype(context_type *context,
case JVM_SIGNATURE_CLASS: {
char buffer_space[256];
char *buffer = buffer_space;
char *finish = strchr(p, JVM_SIGNATURE_ENDCLASS);
const char* finish = strchr(p, JVM_SIGNATURE_ENDCLASS);
int length;
if (finish == NULL) {
/* Signature must have ';' after the class name.
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/unix/native/libjava/TimeZone_md.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -90,7 +90,7 @@ getZoneName(char *str)
{
static const char *zidir = "zoneinfo/";

char *pos = strstr((const char *)str, zidir);
char* pos = strstr(str, zidir);
if (pos == NULL) {
return NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions src/java.instrument/share/native/libinstrument/JPLISAgent.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -769,7 +769,7 @@ getModuleObject(jvmtiEnv* jvmti,
jobject moduleObject = NULL;

/* find last slash in the class name */
char* last_slash = (cname == NULL) ? NULL : strrchr(cname, '/');
const char* last_slash = (cname == NULL) ? NULL : strrchr(cname, '/');
int len = (last_slash == NULL) ? 0 : (int)(last_slash - cname);
char* pkg_name_buf = (char*)malloc(len + 1);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -45,7 +45,7 @@ int filenameStrcmp(const char* s1, const char* s2) {
}

char* basePath(const char* path) {
char* last = strrchr(path, slash);
const char* last = strrchr(path, slash);
if (last == NULL) {
return (char*)path;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ getPortNumber(const char *s_port) {

static jdwpTransportError
parseAddress(const char *address, struct sockaddr_in *sa) {
char *colon;
const char *colon;
int port;

memset((void *)sa, 0, sizeof(struct sockaddr_in));
Expand Down
6 changes: 3 additions & 3 deletions src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -90,8 +90,8 @@ get_time_stamp(char *tbuf, size_t ltbuf)
static const char *
file_basename(const char *file)
{
char *p1;
char *p2;
const char* p1;
const char* p2;

if ( file==NULL )
return "unknown";
Expand Down