Use const http status code instead of just numbers see #24783

Signed-off-by: Doron Podoleanu <doronp@il.ibm.com>
Upstream-commit: 6bec735c91c378e1c9cde1744e7c8aca7397104a
Component: engine
This commit is contained in:
Doron Podoleanu
2016-07-19 10:40:20 +03:00
parent 02b713e818
commit 7f898cc8b4
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -400,7 +400,7 @@ func (d *Daemon) queryRootDir() (string, error) {
var b []byte
var i Info
b, err = readBody(body)
if err == nil && resp.StatusCode == 200 {
if err == nil && resp.StatusCode == http.StatusOK {
// read the docker root dir
if err = json.Unmarshal(b, &i); err == nil {
return i.DockerRootDir, nil
@@ -152,7 +152,7 @@ func (t *testNotary) Ping() error {
if err != nil {
return err
}
if resp.StatusCode != 200 {
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("notary ping replied with an unexpected status code %d", resp.StatusCode)
}
return nil