Skip to content

Commit c8bb7cf

Browse files
author
marc
committed
Fix lint errors and sigsev
1 parent 2af065b commit c8bb7cf

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

c-deps/libroach/db.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1700,7 +1700,7 @@ DBStatus DBOpen(DBEngine **db, DBSlice dir, DBOptions db_opts) {
17001700
options.env = memenv.get();
17011701
}
17021702

1703-
PreambleHandler* preamble;
1703+
PreambleHandler* preamble = nullptr;
17041704
if (db_opts.use_preamble) {
17051705
// The caller makes sure we're not an in-memory DB.
17061706
assert(dir.len != 0);

pkg/storage/engine/rocksdb_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ func TestRocksDBOpenWithVersions(t *testing.T) {
263263

264264
// openRocksDBWithVersion attempts to open a rocks db instance, optionally with
265265
// the supplied Version struct.
266-
func openRocksDBWithVersion(t *testing.T, hasVersionFile bool, ver Version, wantPreambleFormat bool) (Version, error) {
266+
func openRocksDBWithVersion(
267+
t *testing.T, hasVersionFile bool, ver Version, wantPreambleFormat bool,
268+
) (Version, error) {
267269
dir, err := ioutil.TempDir("", "testing")
268270
if err != nil {
269271
t.Fatal(err)

pkg/storage/engine/version_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestVersions(t *testing.T) {
5050

5151
// Write the same version to the file: not allowed.
5252
if err := writeVersionFile(dir, ver); !testutils.IsError(err, "writing version 0 is not allowed") {
53-
t.Errorf("expected error '%s', got '%v'", "writing version 0 is not allowed")
53+
t.Errorf("expected error '%s', got '%v'", "writing version 0 is not allowed", err)
5454
}
5555

5656
// Try again with current version.

0 commit comments

Comments
 (0)