From 3cde608eda01522652e5d3a9ae6ccede001f386f Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 24 Nov 2016 12:08:44 +0100 Subject: [PATCH] lib/db: Fix ineffassign lint issue --- cmd/syncthing/gui_test.go | 3 +++ lib/db/leveldb_transactions.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/syncthing/gui_test.go b/cmd/syncthing/gui_test.go index 0b5d45336..031649cec 100644 --- a/cmd/syncthing/gui_test.go +++ b/cmd/syncthing/gui_test.go @@ -507,6 +507,9 @@ func TestCSRFRequired(t *testing.T) { cfg := new(mockedConfig) cfg.gui.APIKey = testAPIKey baseURL, err := startHTTP(cfg) + if err != nil { + t.Fatal("Unexpected error from getting base URL:", err) + } cli := &http.Client{ Timeout: time.Second, diff --git a/lib/db/leveldb_transactions.go b/lib/db/leveldb_transactions.go index 8fa509742..76af85f52 100644 --- a/lib/db/leveldb_transactions.go +++ b/lib/db/leveldb_transactions.go @@ -128,7 +128,7 @@ func (t readWriteTransaction) updateGlobal(folder, device []byte, file protocol. Version: file.Version, } - insertedAt := -1 + var insertedAt int // Find a position in the list to insert this file. The file at the front // of the list is the newer, the "global". for i := range fl.Versions {