mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
ctld: Catch exceptions by reference instead of by value
Reported by: GCC -Wcatch-value Sponsored by: Chelsio Communications
This commit is contained in:
parent
e3ac01e18e
commit
ab328f4e33
2 changed files with 2 additions and 2 deletions
|
|
@ -466,7 +466,7 @@ parse_conf(const char *path)
|
|||
bool parsed;
|
||||
try {
|
||||
parsed = yyparse_conf(fp.get());
|
||||
} catch (std::bad_alloc) {
|
||||
} catch (std::bad_alloc &) {
|
||||
log_warnx("failed to allocate memory parsing %s", path);
|
||||
return (false);
|
||||
} catch (...) {
|
||||
|
|
|
|||
|
|
@ -1418,7 +1418,7 @@ uclparse_conf(const char *path)
|
|||
bool parsed;
|
||||
try {
|
||||
parsed = uclparse_toplevel(top);
|
||||
} catch (std::bad_alloc) {
|
||||
} catch (std::bad_alloc &) {
|
||||
log_warnx("failed to allocate memory parsing %s", path);
|
||||
parsed = false;
|
||||
} catch (...) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue