From 5803389588307cd87d5747b70c2d2e2afe54a1bf Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Mon, 22 Feb 2016 15:29:52 -0800 Subject: [PATCH] Fix some pointer inconsistencies in code --- cmd/common.go | 2 +- scanner.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/common.go b/cmd/common.go index 63eb46e..ed5b178 100644 --- a/cmd/common.go +++ b/cmd/common.go @@ -167,7 +167,7 @@ func Main (argStateDir string, processCallback ctwatch.ProcessCallback) { ParallelFetch: *parallelFetch, Quiet: !*verbose, } - scanner := ctwatch.NewScanner(logUri, logKey, opts) + scanner := ctwatch.NewScanner(logUri, logKey, &opts) latestSTH, err := scanner.GetSTH() if err != nil { diff --git a/scanner.go b/scanner.go index 7191277..9619e69 100644 --- a/scanner.go +++ b/scanner.go @@ -287,11 +287,11 @@ func (s *Scanner) Scan(startIndex int64, endIndex int64, processCert ProcessCall // Creates a new Scanner instance using |client| to talk to the log, and taking // configuration options from |opts|. -func NewScanner(logUri string, publicKey crypto.PublicKey, opts ScannerOptions) *Scanner { +func NewScanner(logUri string, publicKey crypto.PublicKey, opts *ScannerOptions) *Scanner { var scanner Scanner scanner.LogUri = logUri scanner.publicKey = publicKey scanner.logClient = client.New(logUri) - scanner.opts = opts + scanner.opts = *opts return &scanner }