From: Marcel Holtmann Date: Tue, 12 Jul 2011 09:39:04 +0000 (+0200) Subject: provider: Remove pointless jump to error label X-Git-Tag: 2.0_alpha~1327 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2fdb73604f5013a293c9a9b4039595127cbf3ae0;p=framework%2Fconnectivity%2Fconnman.git provider: Remove pointless jump to error label This fixes a compiler warning for an uninitialized variable. And this warning is a real error. CC src/provider.o src/provider.c: In function ‘__connman_provider_create_and_connect’: src/provider.c:476: warning: ‘provider’ may be used uninitialized in this function --- diff --git a/src/provider.c b/src/provider.c index 1519cb5..68183dc 100644 --- a/src/provider.c +++ b/src/provider.c @@ -510,17 +510,13 @@ int __connman_provider_create_and_connect(DBusMessage *msg) dbus_message_iter_next(&array); } - if (host == NULL || domain == NULL) { - err = -EINVAL; - goto failed; - } + if (host == NULL || domain == NULL) + return -EINVAL; DBG("Type %s name %s", type, name); - if (type == NULL || name == NULL) { - err = -EOPNOTSUPP; - goto failed; - } + if (type == NULL || name == NULL) + return -EOPNOTSUPP; ident = g_strdup_printf("%s_%s", host, domain); provider_dbus_ident(ident);