summaryrefslogtreecommitdiff
path: root/lib/share.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-11-07 09:21:35 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-11-07 09:21:35 +0000
commitcbd1a77ec24e397d05f20c6de106625676343c9d (patch)
treeb92440210b287a25e34293646d26fe124581c767 /lib/share.c
parent33f7ac06c3aaecf995360323d6f425e769e6fa79 (diff)
downloadcurl-cbd1a77ec24e397d05f20c6de106625676343c9d.tar.gz
if () => if()
while () => while() and some other minor re-indentings
Diffstat (limited to 'lib/share.c')
-rw-r--r--lib/share.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/share.c b/lib/share.c
index de13b6021..eb2ee78ce 100644
--- a/lib/share.c
+++ b/lib/share.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -38,7 +38,7 @@ curl_share_init(void)
{
struct Curl_share *share =
(struct Curl_share *)malloc(sizeof(struct Curl_share));
- if (share) {
+ if(share) {
memset (share, 0, sizeof(struct Curl_share));
share->specifier |= (1<<CURL_LOCK_DATA_SHARE);
}
@@ -56,7 +56,7 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
curl_unlock_function unlockfunc;
void *ptr;
- if (share->dirty)
+ if(share->dirty)
/* don't allow setting options while one or more handles are already
using this share */
return CURLSHE_IN_USE;
@@ -70,7 +70,7 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
share->specifier |= (1<<type);
switch( type ) {
case CURL_LOCK_DATA_DNS:
- if (!share->hostcache) {
+ if(!share->hostcache) {
share->hostcache = Curl_mk_dnscache();
if(!share->hostcache)
return CURLSHE_NOMEM;
@@ -79,7 +79,7 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
case CURL_LOCK_DATA_COOKIE:
- if (!share->cookies) {
+ if(!share->cookies) {
share->cookies = Curl_cookie_init(NULL, NULL, NULL, TRUE );
if(!share->cookies)
return CURLSHE_NOMEM;
@@ -102,7 +102,7 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
switch( type )
{
case CURL_LOCK_DATA_DNS:
- if (share->hostcache) {
+ if(share->hostcache) {
Curl_hash_destroy(share->hostcache);
share->hostcache = NULL;
}
@@ -110,7 +110,7 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
case CURL_LOCK_DATA_COOKIE:
- if (share->cookies) {
+ if(share->cookies) {
Curl_cookie_cleanup(share->cookies);
share->cookies = NULL;
}
@@ -155,14 +155,14 @@ curl_share_cleanup(CURLSH *sh)
{
struct Curl_share *share = (struct Curl_share *)sh;
- if (share == NULL)
+ if(share == NULL)
return CURLSHE_INVALID;
if(share->lockfunc)
share->lockfunc(NULL, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE,
share->clientdata);
- if (share->dirty) {
+ if(share->dirty) {
if(share->unlockfunc)
share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
return CURLSHE_IN_USE;
@@ -190,7 +190,7 @@ Curl_share_lock(struct SessionHandle *data, curl_lock_data type,
{
struct Curl_share *share = data->share;
- if (share == NULL)
+ if(share == NULL)
return CURLSHE_INVALID;
if(share->specifier & (1<<type)) {
@@ -207,7 +207,7 @@ Curl_share_unlock(struct SessionHandle *data, curl_lock_data type)
{
struct Curl_share *share = data->share;
- if (share == NULL)
+ if(share == NULL)
return CURLSHE_INVALID;
if(share->specifier & (1<<type)) {