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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user