aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2012-12-06 01:25:21 +0000
committerEitan Adler <eadler@FreeBSD.org>2012-12-06 01:25:21 +0000
commitc3fa0037ba42a4d17ec37337fc2b2c83f2dfdafe (patch)
tree761d2448ead9c47f423d956e587be70de5496def /sbin
parentedee691dcf4966082b1e290a2339f164001d4e7c (diff)
downloadsrc-c3fa0037ba42a4d17ec37337fc2b2c83f2dfdafe.tar.gz
src-c3fa0037ba42a4d17ec37337fc2b2c83f2dfdafe.zip
Prefer the use of initalizer lists to ctor assignment.
Approved by: cperciva MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=243932
Diffstat (limited to 'sbin')
-rw-r--r--sbin/devd/devd.cc3
-rw-r--r--sbin/devd/devd.hh2
2 files changed, 2 insertions, 3 deletions
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
index 332b6cb30ec1..576dcf6b780f 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 f50e50262a68..36132160c475 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 *);