From 634f84fed41f8c46b4014de9bd40a2ebdf485deb Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 24 Feb 2022 15:08:51 -0800 Subject: Remove unnecessarily complicated code. Change-Id: If2bd0b49cb8de28aa652f03e1fcd16efa9bf648e --- Binder.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/Binder.cpp b/Binder.cpp index b90639f..6d26414 100644 --- a/Binder.cpp +++ b/Binder.cpp @@ -129,20 +129,12 @@ status_t BHwBinder::transact( } } - status_t err = NO_ERROR; - switch (code) { - default: - err = onTransact(code, data, reply, flags, - [&](auto &replyParcel) { - replyParcel.setDataPosition(0); - if (callback != nullptr) { - callback(replyParcel); - } - }); - break; - } - - return err; + return onTransact(code, data, reply, flags, [&](auto& replyParcel) { + replyParcel.setDataPosition(0); + if (callback != nullptr) { + callback(replyParcel); + } + }); } status_t BHwBinder::linkToDeath( -- cgit v1.2.3