From 5d17d044c757d2419194f057bd3191f145da4aa5 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Fri, 21 Jul 2017 12:42:07 -0700 Subject: [PATCH] init: use delegating constructor for Service Test: init unit tests Change-Id: Ida0be6195a3675bfca3d979db03855b45417b11e --- init/service.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/init/service.cpp b/init/service.cpp index 82dd9b137..fc64db69a 100644 --- a/init/service.cpp +++ b/init/service.cpp @@ -156,27 +156,7 @@ ServiceEnvironmentInfo::ServiceEnvironmentInfo(const std::string& name, } Service::Service(const std::string& name, const std::vector& args) - : name_(name), - classnames_({"default"}), - flags_(0), - pid_(0), - crash_count_(0), - uid_(0), - gid_(0), - namespace_flags_(0), - seclabel_(""), - onrestart_(false, "", 0), - keychord_id_(0), - ioprio_class_(IoSchedClass_NONE), - ioprio_pri_(0), - priority_(0), - oom_score_adjust_(-1000), - swappiness_(-1), - soft_limit_in_bytes_(-1), - limit_in_bytes_(-1), - args_(args) { - onrestart_.InitSingleTrigger("onrestart"); -} + : Service(name, 0, 0, 0, {}, 0, 0, "", args) {} Service::Service(const std::string& name, unsigned flags, uid_t uid, gid_t gid, const std::vector& supp_gids, const CapSet& capabilities,