diff options
Diffstat (limited to 'sbin/devd/devd.cc')
-rw-r--r-- | sbin/devd/devd.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index b52bf22..405720b 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -585,7 +585,7 @@ config::expand_one(const char *&src, string &dst) src++; // $$ -> $ if (*src == '$') { - dst.append(src++, 1); + dst += *src++; return; } @@ -593,7 +593,7 @@ config::expand_one(const char *&src, string &dst) // Not sure if I want to support this or not, so for now we just pass // it through. if (*src == '(') { - dst.append("$"); + dst += '$'; count = 1; /* If the string ends before ) is matched , return. */ while (count > 0 && *src) { @@ -601,21 +601,21 @@ config::expand_one(const char *&src, string &dst) count--; else if (*src == '(') count++; - dst.append(src++, 1); + dst += *src++; } return; } // ${^A-Za-z] -> $\1 if (!isalpha(*src)) { - dst.append("$"); - dst.append(src++, 1); + dst += '$'; + dst += *src++; return; } // $var -> replace with value do { - buffer.append(src++, 1); + buffer += *src++; } while (is_id_char(*src)); dst.append(get_variable(buffer)); } |