Merge branch 'master' of github.com:umbel/pilosa

This commit is contained in:
Todd Gruben 2016-09-01 12:07:27 -05:00
commit 51560213f9
2 changed files with 2 additions and 3 deletions

View file

@ -711,8 +711,7 @@ func (cmd *InspectCommand) Run() error {
t := time.Now()
fmt.Fprintf(cmd.Stderr, "unmarshaling bitmap...")
bm := roaring.NewBitmap()
buf := (*[0x7FFFFFFF]byte)(unsafe.Pointer(&data[0]))[:fi.Size()]
if err := bm.UnmarshalBinary(buf); err != nil {
if err := bm.UnmarshalBinary(data); err != nil {
return err
}
fmt.Fprintf(cmd.Stderr, " (%s)\n", time.Since(t))

View file

@ -191,7 +191,7 @@ func (f *Fragment) openStorage() error {
}
// Attach the mmap file to the bitmap.
data := (*[0x7FFFFFFF]byte)(unsafe.Pointer(&f.storageData[0]))[:fi.Size()]
data := f.storageData
if err := f.storage.UnmarshalBinary(data); err != nil {
return fmt.Errorf("unmarshal storage: file=%s, err=%s", f.file.Name(), err)
}