diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-10-28 19:36:21 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-10-28 19:36:21 +0100 |
commit | 556357b9cd970c1b6ba3fc5fd3d34c35e057f0dc (patch) | |
tree | 617c5d70f6f84dafee412e7f44059f8a265187d1 /src | |
parent | 477396a0e1069f8876ec069ec01edb8523548cf6 (diff) | |
parent | 7cad0a47a07c5b32e1b547e6b293a1f96daf39ba (diff) | |
download | vyatta-cfg-556357b9cd970c1b6ba3fc5fd3d34c35e057f0dc.tar.gz vyatta-cfg-556357b9cd970c1b6ba3fc5fd3d34c35e057f0dc.zip |
Merge branch 'current' into crux
Conflicts:
debian/vyatta-cfg.vyatta-router.service
Diffstat (limited to 'src')
-rw-r--r-- | src/cnode/cnode-algorithm.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cnode/cnode-algorithm.cpp b/src/cnode/cnode-algorithm.cpp index 6638936..379fb6a 100644 --- a/src/cnode/cnode-algorithm.cpp +++ b/src/cnode/cnode-algorithm.cpp @@ -513,7 +513,12 @@ _diff_show_other(const CfgNode *cfg1, const CfgNode *cfg2, int level, _diff_print_indent(cfg1, cfg2, level, pfx_diff); if (is_value) { // at tag value - printf("%s %s", name.c_str(), value.c_str()); + const char *quote = ""; + size_t vlen = value.length(); + if (strcspn(value.c_str(), "*}{;\011\012\013\014\015 ") < vlen) { + quote = "\""; + } + printf("%s %s%s%s", name.c_str(), quote, value.c_str(), quote); } else { // at intermediate node printf("%s", name.c_str()); |