From 75914199f331a10eb7ed44de68c738515bdd5b2d Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 7 Feb 2018 16:30:53 -0500 Subject: Fix further style issues Signed-off-by: Matthew Heon Closes: #268 Approved by: rhatdan --- libpod/sql_state.go | 6 ++---- libpod/sql_state_internal.go | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'libpod') diff --git a/libpod/sql_state.go b/libpod/sql_state.go index ff04d6d63..f67969cf7 100644 --- a/libpod/sql_state.go +++ b/libpod/sql_state.go @@ -920,13 +920,11 @@ func (s *SQLState) RemovePodContainers(pod *Pod) (err error) { // Remove state first, as it needs the subquery on containers // Don't bother checking if we actually removed anything, we just want to // empty the pod - _, err = tx.Exec(removeCtrState, pod.ID()) - if err != nil { + if _, err := tx.Exec(removeCtrState, pod.ID()); err != nil { return errors.Wrapf(err, "error removing pod %s containers from state table", pod.ID()) } - _, err = tx.Exec(removeCtr, pod.ID()) - if err != nil { + if _, err := tx.Exec(removeCtr, pod.ID()); err != nil { return errors.Wrapf(err, "error removing pod %s containers from containers table", pod.ID()) } diff --git a/libpod/sql_state_internal.go b/libpod/sql_state_internal.go index 5bc2d84f5..5e18b7cfd 100644 --- a/libpod/sql_state_internal.go +++ b/libpod/sql_state_internal.go @@ -672,8 +672,7 @@ func (s *SQLState) ctrFromScannable(row scannable) (*Container, error) { // Retrieve the ports from disk // They may not exist - if they don't, this container just doesn't have ports portPath := getPortsPath(s.specsDir, id) - _, err = os.Stat(portPath) - if err != nil { + if _, err = os.Stat(portPath); err != nil { if !os.IsNotExist(err) { return nil, errors.Wrapf(err, "error stating container %s JSON ports", id) } -- cgit v1.2.3-54-g00ecf