diff --git a/discovery/xds/kuma.go b/discovery/xds/kuma.go index 77f9f0561b..5ef5737204 100644 --- a/discovery/xds/kuma.go +++ b/discovery/xds/kuma.go @@ -103,11 +103,7 @@ func (c *KumaSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { return errors.Errorf("kuma SD server must not be empty and have a scheme: %s", c.Server) } - if err := c.HTTPClientConfig.Validate(); err != nil { - return err - } - - return nil + return c.HTTPClientConfig.Validate() } func (c *KumaSDConfig) Name() string { diff --git a/tsdb/wal/wal.go b/tsdb/wal/wal.go index b2d3709142..a38dfdab20 100644 --- a/tsdb/wal/wal.go +++ b/tsdb/wal/wal.go @@ -452,10 +452,7 @@ func (w *WAL) Repair(origErr error) error { if err != nil { return err } - if err := w.setSegment(s); err != nil { - return err - } - return nil + return w.setSegment(s) } // SegmentName builds a segment name for the directory.