diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2015-07-20 02:34:57 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2015-07-20 02:34:57 -0700 |
commit | 08911e2dcc31a6d7acf4ba186d953cb85b0fa5c4 (patch) | |
tree | 5710716b21de73355cfed227310a967a917e8a97 /history.cpp | |
parent | dd4639e5dbf7838bbd2e1ba8b5a0f81eec2c2a89 (diff) |
Fix for miscellaneous issues identiifed by Coverity Scan
Diffstat (limited to 'history.cpp')
-rw-r--r-- | history.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/history.cpp b/history.cpp index a4ad5435..9bed7b05 100644 --- a/history.cpp +++ b/history.cpp @@ -542,6 +542,7 @@ history_t::history_t(const wcstring &pname) : disable_automatic_save_counter(0), mmap_start(NULL), mmap_length(0), + mmap_type(history_file_type_t(-1)), mmap_file_id(kInvalidFileID), boundary_timestamp(time(NULL)), countdown_to_vacuum(-1), @@ -1443,7 +1444,10 @@ bool history_t::save_internal_via_rewrite() else { wcstring new_name = history_filename(name, wcstring()); - wrename(tmp_name, new_name); + if (0 > wrename(tmp_name, new_name)) + { + debug(2, L"Error when renaming history file"); + } } close(out_fd); } |