summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2012-12-06 01:25:21 +0000
committereadler <eadler@FreeBSD.org>2012-12-06 01:25:21 +0000
commitd63ec4c24b02575838256ea35e13bf20df348995 (patch)
tree761d2448ead9c47f423d956e587be70de5496def /sbin
parent76f827328bff797fb7cf44ba938fedf5f11ab20f (diff)
downloadFreeBSD-src-d63ec4c24b02575838256ea35e13bf20df348995.zip
FreeBSD-src-d63ec4c24b02575838256ea35e13bf20df348995.tar.gz
Prefer the use of initalizer lists to ctor assignment.
Approved by: cperciva MFC after: 2 weeks
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 332b6cb..576dcf6 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 f50e502..3613216 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 *);
OpenPOWER on IntegriCloud