From cbd1a77ec24e397d05f20c6de106625676343c9d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Nov 2007 09:21:35 +0000 Subject: if () => if() while () => while() and some other minor re-indentings --- lib/share.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/share.c') 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, , et al. + * Copyright (C) 1998 - 2007, Daniel Stenberg, , 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<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<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<share; - if (share == NULL) + if(share == NULL) return CURLSHE_INVALID; if(share->specifier & (1<