Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ Agent_OnLoad(JavaVM *vm, char *options, void *reserved) {
return jni_err;
}

jvmtiCapabilities capabilities{};
jvmtiCapabilities capabilities;
memset(&capabilities, 0, sizeof(jvmtiCapabilities));
Comment on lines +105 to +106
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used {} to zero initialize all the fields of this struct. I see other use cases are also using memset to zero out the struct.

capabilities.can_generate_method_exit_events = 1;

jvmtiError err = env->AddCapabilities(&capabilities);
Expand Down