summaryrefslogtreecommitdiff
path: root/libpod/sql_state_internal.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-18 13:17:03 -0500
committerMatthew Heon <matthew.heon@gmail.com>2017-11-18 13:17:03 -0500
commitf2894eda689a24c069b55b1e2ad3e6136836b326 (patch)
treea3b2cb1a019693838fec614f2c2f4fcd769b5479 /libpod/sql_state_internal.go
parent898138441d392c08fb658ed8654d5b1effa06a31 (diff)
downloadpodman-f2894eda689a24c069b55b1e2ad3e6136836b326.tar.gz
podman-f2894eda689a24c069b55b1e2ad3e6136836b326.tar.bz2
podman-f2894eda689a24c069b55b1e2ad3e6136836b326.zip
Fix lint errors
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/sql_state_internal.go')
-rw-r--r--libpod/sql_state_internal.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/libpod/sql_state_internal.go b/libpod/sql_state_internal.go
index 5c9da03e2..698b0433c 100644
--- a/libpod/sql_state_internal.go
+++ b/libpod/sql_state_internal.go
@@ -110,11 +110,7 @@ func boolToSQL(b bool) int {
// Convert a bool from SQL-readable format
func boolFromSQL(i int) bool {
- if i == 0 {
- return false
- }
-
- return true
+ return i != 0
}
// Convert a time.Time into SQL-readable format
@@ -208,7 +204,7 @@ func ctrFromScannable(row scannable, runtime *Runtime, specsDir string) (*Contai
}
labels := make(map[string]string)
- if err := json.Unmarshal([]byte(labelsJSON), labels); err != nil {
+ if err := json.Unmarshal([]byte(labelsJSON), &labels); err != nil {
return nil, errors.Wrapf(err, "error parsing container %s labels JSON", id)
}
ctr.config.Labels = labels