minor cleanup

- Reused contains() from utils.go at a couple of places
- Cleanup in return statements and boolean checks
This commit is contained in:
Mohit Agarwal authored and Harshavardhana committed 2016-08-24 22:54:34 -07:00
1 parent ec4260d260
commit 418921de89
10 files changed
+20 -51

No files matched your search

+1 -9
View File
@@ -37,15 +37,7 @@ func setMaxOpenFiles() error {
// TO increase this limit further user has to manually edit
// `/etc/security/limits.conf`
rLimit.Cur = rLimit.Max
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
return err
}
err = syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
return err
}
return nil
return syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
}
// Set max memory used by minio as a process, this value is usually