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
2016-08-16 20:27:14 +05:30
committed by Harshavardhana
parent ec4260d260
commit 418921de89
10 changed files with 20 additions and 51 deletions
+2 -10
View File
@@ -16,11 +16,7 @@ type storageServer struct {
// MakeVolHandler - make vol handler is rpc wrapper for MakeVol operation.
func (s *storageServer) MakeVolHandler(arg *string, reply *GenericReply) error {
err := s.storage.MakeVol(*arg)
if err != nil {
return err
}
return nil
return s.storage.MakeVol(*arg)
}
// ListVolsHandler - list vols handler is rpc wrapper for ListVols operation.
@@ -46,11 +42,7 @@ func (s *storageServer) StatVolHandler(arg *string, reply *VolInfo) error {
// DeleteVolHandler - delete vol handler is a rpc wrapper for
// DeleteVol operation.
func (s *storageServer) DeleteVolHandler(arg *string, reply *GenericReply) error {
err := s.storage.DeleteVol(*arg)
if err != nil {
return err
}
return nil
return s.storage.DeleteVol(*arg)
}
/// File operations