diff options
| author | 2017-08-28 08:02:19 +0000 | |
|---|---|---|
| committer | 2017-08-28 08:02:19 +0000 | |
| commit | 5fe8e51904a6fc3be25d710cbbd620acdf721a6d (patch) | |
| tree | dbf3a121b4e18f7a3fa59344a218d8365035e0f4 | |
| parent | b5b1308f2fdcf2f3f0b6c862e6afa73017f642f9 (diff) | |
| parent | f57aeea077ffc8be92ff4d82aaaf1d706b0b5fbd (diff) | |
Merge "switch to native_handle_create() for passing ownership"
| -rw-r--r-- | services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp b/services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp index 87312f82d58a..f9cbd1601290 100644 --- a/services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp +++ b/services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp @@ -74,10 +74,9 @@ int conntrackSocket(unsigned groups) { hidl_handle handleFromFileDescriptor(base::unique_fd fd) { hidl_handle h; - NATIVE_HANDLE_DECLARE_STORAGE(storage, 0, 0); static constexpr int kNumFds = 1; static constexpr int kNumInts = 0; - native_handle_t *nh = native_handle_init(storage, kNumFds, kNumInts); + native_handle_t *nh = native_handle_create(kNumFds, kNumInts); nh->data[0] = fd.release(); static constexpr bool kTakeOwnership = true; |