Skip to content

Commit 3fa8f01

Browse files
committed
8366092: [GCC static analyzer] UnixOperatingSystem.c warning: use of uninitialized value 'systemTicks'
Backport-of: a6e2a329a07c71582ac696809fb5349c6a0b681c
1 parent 84702b6 commit 3fa8f01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jdk.management/linux/native/libmanagement_ext/UnixOperatingSystem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -193,7 +193,7 @@ static int get_jvmticks(ticks *pticks) {
193193
uint64_t userTicks;
194194
uint64_t systemTicks;
195195

196-
if (read_ticks("/proc/self/stat", &userTicks, &systemTicks) < 0) {
196+
if (read_ticks("/proc/self/stat", &userTicks, &systemTicks) != 2) {
197197
return -1;
198198
}
199199

0 commit comments

Comments
 (0)