Skip to content

Commit

Permalink
Initialize pointer to null
Browse files Browse the repository at this point in the history
  • Loading branch information
learnforpractice committed Oct 24, 2018
1 parent 1c721b0 commit 2a83870
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/eosiolib_native/eosiolib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace eosio {
} /// namespace eosio

#include "vm_api.h"
static struct vm_api* s_api;
static struct vm_api* s_api = nullptr;
void vm_register_api(struct vm_api* api) {
if (!api) {
throw std::runtime_error("vm_api pointer can not be NULL!");
Expand Down
3 changes: 1 addition & 2 deletions libraries/vm/vm_wasm/vm_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <fc/crypto/sha256.hpp>
#include <fc/crypto/sha1.hpp>
#include <fc/io/raw.hpp>
#include <fc/uint128.hpp>

#include <softfloat.hpp>
#include <compiler_builtins.hpp>
Expand Down Expand Up @@ -1658,8 +1659,6 @@ std::istream& operator>>(std::istream& in, wasm_interface::vm_type& runtime) {
in >> s;
if (s == "wavm")
runtime = eosio::chain::wasm_interface::vm_type::wavm;
else if (s == "binaryen")
runtime = eosio::chain::wasm_interface::vm_type::binaryen;
else if (s == "wabt")
runtime = eosio::chain::wasm_interface::vm_type::wabt;
else
Expand Down

0 comments on commit 2a83870

Please sign in to comment.