* use actual error code instead of "false"
* add missing new line
Before:
```
nfware# show interface | include (a]
% Regex compilation error: Success% Bad regexp '(a]'
% Unknown command: show interface | include (a]
```
After:
```
nfware# show interface | include (a]
% Regex compilation error: Unmatched ( or \(
% Bad regexp '(a]'
% Unknown command: show interface | include (a]
```
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
REG_EXTENDED | REG_NEWLINE | REG_NOSUB);
if (errcode) {
ret = false;
- regerror(ret, &vty->include, errbuf, sizeof(errbuf));
- vty_out(vty, "%% Regex compilation error: %s", errbuf);
+ regerror(errcode, &vty->include, errbuf, sizeof(errbuf));
+ vty_out(vty, "%% Regex compilation error: %s\n", errbuf);
} else {
vty->filter = true;
}