return bundle;
}
-static bool conncache_add_bundle(struct conncache *connc,
- char *key,
- struct connectbundle *bundle)
+static void *conncache_add_bundle(struct conncache *connc,
+ char *key,
+ struct connectbundle *bundle)
{
- void *p = Curl_hash_add(&connc->hash, key, strlen(key), bundle);
-
- return p?TRUE:FALSE;
+ return Curl_hash_add(&connc->hash, key, strlen(key), bundle);
}
static void conncache_remove_bundle(struct conncache *connc,
bundle = Curl_conncache_find_bundle(data, conn, data->state.conn_cache,
NULL);
if(!bundle) {
- int rc;
char key[HASHKEY_SIZE];
result = bundle_create(&bundle);
}
hashkey(conn, key, sizeof(key), NULL);
- rc = conncache_add_bundle(data->state.conn_cache, key, bundle);
- if(!rc) {
+ if(!conncache_add_bundle(data->state.conn_cache, key, bundle)) {
bundle_destroy(bundle);
result = CURLE_OUT_OF_MEMORY;
goto unlock;