From 79c7f7193b3dc91046c0d11718588885ff7c8aa6 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Mon, 23 Jan 2017 21:02:55 +0000 Subject: [PATCH] lib/upnp: Remove unnecessary error allocation GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3923 --- lib/upnp/upnp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/upnp/upnp.go b/lib/upnp/upnp.go index 4f4b50f9..e72132d6 100644 --- a/lib/upnp/upnp.go +++ b/lib/upnp/upnp.go @@ -226,7 +226,7 @@ func parseResponse(deviceType string, resp []byte) (IGD, error) { } deviceUUID := strings.TrimPrefix(strings.Split(deviceUSN, "::")[0], "uuid:") - matched, err := regexp.MatchString("[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", deviceUUID) + matched, _ := regexp.MatchString("[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", deviceUUID) if !matched { l.Infoln("Invalid IGD response: invalid device UUID", deviceUUID, "(continuing anyway)") }