Simplifying const/destructor in TetherController.
The current destructor is useless, and member initializers can be used.
Test: netd_unit_test passing.
Change-Id: I43d65ff5d4c5790e6322b769f111ec25fb97d767
diff --git a/server/TetherController.h b/server/TetherController.h
index a34b5b7..c824e74 100644
--- a/server/TetherController.h
+++ b/server/TetherController.h
@@ -46,16 +46,16 @@
// NetId to use for forwarded DNS queries. This may not be the default
// network, e.g., in the case where we are tethering to a DUN APN.
- unsigned mDnsNetId;
+ unsigned mDnsNetId = 0;
std::list<std::string> mDnsForwarders;
- pid_t mDaemonPid;
- int mDaemonFd;
+ pid_t mDaemonPid = 0;
+ int mDaemonFd = -1;
std::set<std::string> mForwardingRequests;
public:
TetherController();
- virtual ~TetherController();
+ ~TetherController() = default;
bool enableForwarding(const char* requester);
bool disableForwarding(const char* requester);