mirror of
https://github.com/monero-project/monero.git
synced 2025-08-10 02:00:17 -04:00
Merge pull request #5893
Coverity fixes [3a81639
,1bd962d
,2825f07
,d099658
,d46f701
,cd57a10
] (anonimal)
This commit is contained in:
commit
c6430f9dd0
6 changed files with 24 additions and 4 deletions
|
@ -12,7 +12,7 @@
|
|||
namespace cryptonote
|
||||
{
|
||||
|
||||
bootstrap_daemon::bootstrap_daemon(std::function<boost::optional<std::string>()> get_next_public_node) noexcept
|
||||
bootstrap_daemon::bootstrap_daemon(std::function<boost::optional<std::string>()> get_next_public_node)
|
||||
: m_get_next_public_node(get_next_public_node)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace cryptonote
|
|||
class bootstrap_daemon
|
||||
{
|
||||
public:
|
||||
bootstrap_daemon(std::function<boost::optional<std::string>()> get_next_public_node) noexcept;
|
||||
bootstrap_daemon(std::function<boost::optional<std::string>()> get_next_public_node);
|
||||
bootstrap_daemon(const std::string &address, const boost::optional<epee::net_utils::http::login> &credentials);
|
||||
|
||||
std::string address() const noexcept;
|
||||
|
|
|
@ -13195,6 +13195,12 @@ bool wallet2::save_to_file(const std::string& path_to_file, const std::string& r
|
|||
}
|
||||
|
||||
FILE *fp = fopen(path_to_file.c_str(), "w+");
|
||||
if (!fp)
|
||||
{
|
||||
MERROR("Failed to open wallet file for writing: " << path_to_file << ": " << strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Save the result b/c we need to close the fp before returning success/failure.
|
||||
int write_result = PEM_write(fp, ASCII_OUTPUT_MAGIC.c_str(), "", (const unsigned char *) raw.c_str(), raw.length());
|
||||
fclose(fp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue