diff options
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/error.hh | 3 | ||||
-rw-r--r-- | src/libutil/tests/logging.cc | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/libutil/error.hh b/src/libutil/error.hh index ff58d3e00..e55986d6f 100644 --- a/src/libutil/error.hh +++ b/src/libutil/error.hh @@ -195,9 +195,8 @@ public: template<typename... Args> SysError(const Args & ... args) - : Error("") + : Error(""), errNo(errno) { - errNo = errno; auto hf = hintfmt(args...); err.msg = hintfmt("%1%: %2%", normaltxt(hf.str()), strerror(errNo)); } diff --git a/src/libutil/tests/logging.cc b/src/libutil/tests/logging.cc index d990e5499..6c649820b 100644 --- a/src/libutil/tests/logging.cc +++ b/src/libutil/tests/logging.cc @@ -359,7 +359,7 @@ namespace nix { // constructing without access violation. ErrPos ep(invalid); - + // assignment without access violation. ep = invalid; |