commit | 8e965d90de1a5326213a0371fe87e6970d55ac68 | [log] [tgz] |
---|---|---|
author | Christopher Ferris <cferris@google.com> | Thu Nov 03 01:20:03 2022 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Nov 03 01:20:03 2022 +0000 |
tree | 76d737b940c2c40ccb92603b58814d2fe928c277 | |
parent | dcbe8650b6ac75485dacd38f66263373c6e4bf82 [diff] | |
parent | 8b0619b47dcfb49e2269691439cb4c6a33bbb00b [diff] |
Merge "Modify a data structure into a union."
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;