From 28b367db15f444c172260b2247b4a782ba387049 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Fri, 25 Jul 2014 10:29:50 -0700 Subject: [PATCH] Initialize next_id --- utilities/spatialdb/spatial_db.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utilities/spatialdb/spatial_db.cc b/utilities/spatialdb/spatial_db.cc index e6c1c0eeb..2a3588224 100644 --- a/utilities/spatialdb/spatial_db.cc +++ b/utilities/spatialdb/spatial_db.cc @@ -678,7 +678,7 @@ Status SpatialDB::Open(const SpatialDBOptions& options, const std::string& name, } index_cf.emplace_back(index_options, handles[i + 2]); } - uint64_t next_id; + uint64_t next_id = 1; if (s.ok()) { // find next_id Iterator* iter = base_db->NewIterator(ReadOptions(), handles[0]); @@ -690,8 +690,6 @@ Status SpatialDB::Open(const SpatialDBOptions& options, const std::string& name, } else { next_id = last_id + 1; } - } else { - next_id = 1; } delete iter; }