From 773d24ebf722822b027c3c61a5f7ae846ac6725d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2014 10:03:35 +0200 Subject: ZeroconfAvahi: remove "goto" --- src/zeroconf/ZeroconfAvahi.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/zeroconf/ZeroconfAvahi.cxx b/src/zeroconf/ZeroconfAvahi.cxx index 84e748167..9643802ae 100644 --- a/src/zeroconf/ZeroconfAvahi.cxx +++ b/src/zeroconf/ZeroconfAvahi.cxx @@ -111,7 +111,7 @@ static void avahiRegisterService(AvahiClient * c) FormatError(avahi_domain, "Failed to create avahi EntryGroup: %s", avahi_strerror(avahi_client_errno(c))); - goto fail; + return; } } @@ -127,7 +127,7 @@ static void avahiRegisterService(AvahiClient * c) if (ret < 0) { FormatError(avahi_domain, "Failed to add service %s: %s", SERVICE_TYPE, avahi_strerror(ret)); - goto fail; + return; } /* Tell the server to register the service group */ @@ -135,12 +135,8 @@ static void avahiRegisterService(AvahiClient * c) if (ret < 0) { FormatError(avahi_domain, "Failed to commit service group: %s", avahi_strerror(ret)); - goto fail; + return; } - return; - -fail: - return; } /* Callback when avahi changes state */ -- cgit v1.2.3