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
dbus_message_iter_next(&array);
}
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);
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);
ident = g_strdup_printf("%s_%s", host, domain);
provider_dbus_ident(ident);