commit | 0fcfbf598b32708b5ecdcc6f57cead8980086f6c | [log] [tgz] |
---|---|---|
author | Christopher Ferris <cferris@google.com> | Thu Nov 03 03:02:05 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Nov 03 03:02:05 2022 +0000 |
tree | c07c15021fbb3751090a089871dd364edf3ad090 | |
parent | 13456086a06f875b2d78661234614f31e22347a9 [diff] | |
parent | de12b9273e4dd4ba25003b6217eb0515c70adc7d [diff] |
Merge "Modify a data structure into a union." am: 8e965d90de am: 9d6b418d6f am: de12b9273e Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/2243423 Change-Id: I3cd75bcd78d3aa6855eb570f801c61cbca94eb10 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/modules/sensors/dynamic_sensor/ConnectionDetector.cpp b/modules/sensors/dynamic_sensor/ConnectionDetector.cpp index 85b9901..99dab5b 100644 --- a/modules/sensors/dynamic_sensor/ConnectionDetector.cpp +++ b/modules/sensors/dynamic_sensor/ConnectionDetector.cpp
@@ -194,9 +194,9 @@ } bool FileConnectionDetector::readInotifyData() { - struct { + union { struct inotify_event ev; - char padding[NAME_MAX + 1]; + char raw[sizeof(inotify_event) + NAME_MAX + 1]; } buffer; bool ret = true;