1
1
/*
2
- * Copyright (c) 1998, 2022 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 1998, 2023 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -309,14 +309,14 @@ void Abstract_VM_Version::insert_features_names(char* buf, size_t buflen, const
309
309
bool Abstract_VM_Version::print_matching_lines_from_file (const char * filename, outputStream* st, const char * keywords_to_match[]) {
310
310
char line[500 ];
311
311
FILE* fp = os::fopen (filename, " r" );
312
- if (fp == NULL ) {
312
+ if (fp == nullptr ) {
313
313
return false ;
314
314
}
315
315
316
316
st->print_cr (" Virtualization information:" );
317
- while (fgets (line, sizeof (line), fp) != NULL ) {
317
+ while (fgets (line, sizeof (line), fp) != nullptr ) {
318
318
int i = 0 ;
319
- while (keywords_to_match[i] != NULL ) {
319
+ while (keywords_to_match[i] != nullptr ) {
320
320
if (strncmp (line, keywords_to_match[i], strlen (keywords_to_match[i])) == 0 ) {
321
321
st->print (" %s" , line);
322
322
break ;
@@ -354,8 +354,8 @@ int Abstract_VM_Version::number_of_sockets(void) {
354
354
const char * Abstract_VM_Version::cpu_name (void ) {
355
355
assert (_initialized, " should be initialized" );
356
356
char * tmp = NEW_C_HEAP_ARRAY_RETURN_NULL (char , CPU_TYPE_DESC_BUF_SIZE, mtTracing);
357
- if (NULL == tmp) {
358
- return NULL ;
357
+ if (nullptr == tmp) {
358
+ return nullptr ;
359
359
}
360
360
strncpy (tmp, _cpu_name, CPU_TYPE_DESC_BUF_SIZE);
361
361
return tmp;
@@ -364,8 +364,8 @@ const char* Abstract_VM_Version::cpu_name(void) {
364
364
const char * Abstract_VM_Version::cpu_description (void ) {
365
365
assert (_initialized, " should be initialized" );
366
366
char * tmp = NEW_C_HEAP_ARRAY_RETURN_NULL (char , CPU_DETAILED_DESC_BUF_SIZE, mtTracing);
367
- if (NULL == tmp) {
368
- return NULL ;
367
+ if (nullptr == tmp) {
368
+ return nullptr ;
369
369
}
370
370
strncpy (tmp, _cpu_desc, CPU_DETAILED_DESC_BUF_SIZE);
371
371
return tmp;
0 commit comments