From 2fdb73604f5013a293c9a9b4039595127cbf3ae0 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 12 Jul 2011 11:39:04 +0200 Subject: [PATCH] provider: Remove pointless jump to error label MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/provider.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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); -- 2.7.4