Fix erroneous use of nil value

This commit is contained in:
Adam Harrison committed 2015-05-28 10:23:02 +01:00
1 parent cb03d1d763
commit e110a8ab9c
1 file changed
+2 -3
+2 -3
View File
@@ -334,8 +334,7 @@ func (ns *namesSet) addIPToName(zr ZoneRecord, now time.Time) (*recordEntry, err
// Delete a name in the names set // Delete a name in the names set
func (ns *namesSet) deleteName(n string) error { func (ns *namesSet) deleteName(n string) error {
name, found := ns.names[n] if name, found := ns.names[n]; found {
if found {
for _, ipRecord := range name.getAllEntries() { for _, ipRecord := range name.getAllEntries() {
ipRecord.notifyIPObservers() ipRecord.notifyIPObservers()
} }
@@ -343,7 +342,7 @@ func (ns *namesSet) deleteName(n string) error {
delete(ns.names, n) delete(ns.names, n)
return nil return nil
} }
return LookupError(fmt.Sprintf("%+v", name)) return LookupError(n)
} }
// Delete an IPv4 from all names // Delete an IPv4 from all names