Signed-off-by: Jimmy Puckett <jimmy.puckett@spinen.com>
Jimmy Puckett authored on 2015/03/25 10:09:25... | ... |
@@ -445,8 +445,8 @@ func (daemon *Daemon) setupResolvconfWatcher() error { |
445 | 445 |
select { |
446 | 446 |
case event := <-watcher.Events: |
447 | 447 |
if event.Name == "/etc/resolv.conf" && |
448 |
- (event.Op&fsnotify.Write == fsnotify.Write || |
|
449 |
- event.Op&fsnotify.Create == fsnotify.Create) { |
|
448 |
+ (event.Op&fsnotify.Write != 0 || |
|
449 |
+ event.Op&fsnotify.Create != 0) { |
|
450 | 450 |
// verify a real change happened before we go further--a file write may have happened |
451 | 451 |
// without an actual change to the file |
452 | 452 |
updatedResolvConf, newResolvConfHash, err := resolvconf.GetIfChanged() |
... | ... |
@@ -162,7 +162,7 @@ func tryRelocate(oldPath, newPath string) error { |
162 | 162 |
} |
163 | 163 |
// If the destination is a symlink then we already tried to relocate once before |
164 | 164 |
// and it failed so we delete it and try to remove |
165 |
- if s != nil && s.Mode()&os.ModeSymlink == os.ModeSymlink { |
|
165 |
+ if s != nil && s.Mode()&os.ModeSymlink != 0 { |
|
166 | 166 |
if err := os.RemoveAll(newPath); err != nil { |
167 | 167 |
return err |
168 | 168 |
} |
... | ... |
@@ -36,8 +36,8 @@ func setHeaderForSpecialDevice(hdr *tar.Header, ta *tarAppender, name string, st |
36 | 36 |
inode = uint64(s.Ino) |
37 | 37 |
|
38 | 38 |
// Currently go does not fil in the major/minors |
39 |
- if s.Mode&syscall.S_IFBLK == syscall.S_IFBLK || |
|
40 |
- s.Mode&syscall.S_IFCHR == syscall.S_IFCHR { |
|
39 |
+ if s.Mode&syscall.S_IFBLK != 0 || |
|
40 |
+ s.Mode&syscall.S_IFCHR != 0 { |
|
41 | 41 |
hdr.Devmajor = int64(major(uint64(s.Rdev))) |
42 | 42 |
hdr.Devminor = int64(minor(uint64(s.Rdev))) |
43 | 43 |
} |
... | ... |
@@ -176,7 +176,7 @@ func (info *FileInfo) path() string { |
176 | 176 |
} |
177 | 177 |
|
178 | 178 |
func (info *FileInfo) isDir() bool { |
179 |
- return info.parent == nil || info.stat.Mode()&syscall.S_IFDIR == syscall.S_IFDIR |
|
179 |
+ return info.parent == nil || info.stat.Mode()&syscall.S_IFDIR != 0 |
|
180 | 180 |
} |
181 | 181 |
|
182 | 182 |
func (info *FileInfo) addChanges(oldInfo *FileInfo, changes *[]Change) { |