diff options
author | Yang Tse <yangsita@gmail.com> | 2012-12-10 17:04:13 +0100 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-12-10 17:04:13 +0100 |
commit | 4710d3d96977bb60db181083c8a1f39d836b3899 (patch) | |
tree | 0234b1f8fb5f1d67c2fa4a07cdc5778e3f98ef69 /lib | |
parent | d758234ade7c1cbc4cdd91ea1bd6defb6b690340 (diff) |
conncache: fix enumerated type mixed with another type
Diffstat (limited to 'lib')
-rw-r--r-- | lib/conncache.c | 2 | ||||
-rw-r--r-- | lib/conncache.h | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/lib/conncache.c b/lib/conncache.c index b3186037e..dc5b58cbe 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -46,7 +46,7 @@ static void free_bundle_hash_entry(void *freethis) Curl_bundle_destroy(b); } -struct conncache *Curl_conncache_init(int type) +struct conncache *Curl_conncache_init(conncachetype type) { struct conncache *connc; diff --git a/lib/conncache.h b/lib/conncache.h index a6e1af70c..7b7baae2c 100644 --- a/lib/conncache.h +++ b/lib/conncache.h @@ -1,5 +1,5 @@ -#ifndef __CONNCACHE_H -#define __CONNCACHE_H +#ifndef HEADER_CURL_CONNCACHE_H +#define HEADER_CURL_CONNCACHE_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -22,16 +22,18 @@ * ***************************************************************************/ +typedef enum { + CONNCACHE_PRIVATE, /* used for an easy handle alone */ + CONNCACHE_MULTI /* shared within a multi handle */ +} conncachetype; + struct conncache { struct curl_hash *hash; - enum { - CONNCACHE_PRIVATE, /* used for an easy handle alone */ - CONNCACHE_MULTI /* shared within a multi handle */ - } type; + conncachetype type; size_t num_connections; }; -struct conncache *Curl_conncache_init(int type); +struct conncache *Curl_conncache_init(conncachetype type); void Curl_conncache_destroy(struct conncache *connc); @@ -53,4 +55,4 @@ Curl_conncache_find_first_connection(struct conncache *connc); void Curl_conncache_print(struct conncache *connc); -#endif /* __CONNCACHE_H */ +#endif /* HEADER_CURL_CONNCACHE_H */ |