Permalink
Browse files

clean up SetSnapshow while i am here

  • Loading branch information...
1 parent d2bc874 commit 31973815f89a52f202f71d73b0ad776e53004848 @jmhodges committed Apr 18, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 options.go
View
@@ -203,11 +203,11 @@ func (ro *ReadOptions) SetFillCache(b bool) {
//
// See the LevelDB documentation for details.
func (ro *ReadOptions) SetSnapshot(snap *Snapshot) {
- if snap != nil && snap.snap != nil {
- C.leveldb_readoptions_set_snapshot(ro.Opt, snap.snap)
- } else {
- C.leveldb_readoptions_set_snapshot(ro.Opt, nil)
+ var s *C.leveldb_snapshot_t
+ if snap != nil {
+ s = snap.snap
}
+ C.leveldb_readoptions_set_snapshot(ro.Opt, s)
}
// Close deallocates the WriteOptions, freeing its underlying C struct.

0 comments on commit 3197381

Please sign in to comment.