From c3fa0037ba42a4d17ec37337fc2b2c83f2dfdafe Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Thu, 6 Dec 2012 01:25:21 +0000 Subject: [PATCH] Prefer the use of initalizer lists to ctor assignment. Approved by: cperciva MFC after: 2 weeks --- sbin/devd/devd.cc | 3 +-- sbin/devd/devd.hh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index 332b6cb30ec..576dcf6b780 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -248,9 +248,8 @@ action::do_action(config &c) } match::match(config &c, const char *var, const char *re) - : _var(var) + : _var(var), _re("^") { - _re = "^"; if (!c.expand_string(string(re)).empty() && c.expand_string(string(re)).at(0) == '!') { _re.append(c.expand_string(string(re)).substr(1)); diff --git a/sbin/devd/devd.hh b/sbin/devd/devd.hh index f50e50262a6..36132160c47 100644 --- a/sbin/devd/devd.hh +++ b/sbin/devd/devd.hh @@ -144,7 +144,7 @@ private: class config { public: - config() { _pidfile = ""; push_var_table(); } + config() : _pidfile("") { push_var_table(); } virtual ~config() { reset(); } void add_attach(int, event_proc *); void add_detach(int, event_proc *);