summaryrefslogtreecommitdiff
path: root/src/provider.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2011-07-12 11:39:04 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-07-12 11:39:04 +0200
commit2fdb73604f5013a293c9a9b4039595127cbf3ae0 (patch)
tree6ac0ac7613414c7a93795674df037cd7bc310bbc /src/provider.c
parentb09f2865e0ccd574613f368291960cb0ae752619 (diff)
downloadconnman-2fdb73604f5013a293c9a9b4039595127cbf3ae0.tar.gz
connman-2fdb73604f5013a293c9a9b4039595127cbf3ae0.tar.bz2
connman-2fdb73604f5013a293c9a9b4039595127cbf3ae0.zip
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
Diffstat (limited to 'src/provider.c')
-rw-r--r--src/provider.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/provider.c b/src/provider.c
index 1519cb53..68183dc6 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);