Merge pull request #11702 from jimmypuckett/feature/bitflag_checking_style_11668

Feature/bitflag checking style 11668.  Fixes #11668
This commit is contained in:
Alexander Morozov 2015-03-26 08:34:58 -07:00
commit 1d952a6b82
2 changed files with 3 additions and 3 deletions

View file

@ -36,8 +36,8 @@ func setHeaderForSpecialDevice(hdr *tar.Header, ta *tarAppender, name string, st
inode = uint64(s.Ino)
// Currently go does not fil in the major/minors
if s.Mode&syscall.S_IFBLK == syscall.S_IFBLK ||
s.Mode&syscall.S_IFCHR == syscall.S_IFCHR {
if s.Mode&syscall.S_IFBLK != 0 ||
s.Mode&syscall.S_IFCHR != 0 {
hdr.Devmajor = int64(major(uint64(s.Rdev)))
hdr.Devminor = int64(minor(uint64(s.Rdev)))
}

View file

@ -176,7 +176,7 @@ func (info *FileInfo) path() string {
}
func (info *FileInfo) isDir() bool {
return info.parent == nil || info.stat.Mode()&syscall.S_IFDIR == syscall.S_IFDIR
return info.parent == nil || info.stat.Mode()&syscall.S_IFDIR != 0
}
func (info *FileInfo) addChanges(oldInfo *FileInfo, changes *[]Change) {