mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8366092: [GCC static analyzer] UnixOperatingSystem.c warning: use of uninitialized value 'systemTicks'
Reviewed-by: kevinw, asteiner
This commit is contained in:
parent
ba90ccc6a8
commit
a6e2a329a0
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2025, 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
|
||||
@ -195,7 +195,7 @@ static int get_jvmticks(ticks *pticks) {
|
||||
uint64_t userTicks;
|
||||
uint64_t systemTicks;
|
||||
|
||||
if (read_ticks("/proc/self/stat", &userTicks, &systemTicks) < 0) {
|
||||
if (read_ticks("/proc/self/stat", &userTicks, &systemTicks) != 2) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user