Skip to content

Commit a6e2a32

Browse files
committed
8366092: [GCC static analyzer] UnixOperatingSystem.c warning: use of uninitialized value 'systemTicks'
Reviewed-by: kevinw, asteiner
1 parent ba90ccc commit a6e2a32

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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, 2023, 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
@@ -195,7 +195,7 @@ static int get_jvmticks(ticks *pticks) {
195195
uint64_t userTicks;
196196
uint64_t systemTicks;
197197

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

0 commit comments

Comments
 (0)