From b903186fa0189ff241d756d25d07fdfe9885ae49 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 20 Apr 2011 15:17:42 +0200 Subject: source cleanup: unify look, style and indent levels By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed. --- lib/splay.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lib/splay.c') diff --git a/lib/splay.c b/lib/splay.c index dcc42cf26..ce8a8a57b 100644 --- a/lib/splay.c +++ b/lib/splay.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1997 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1997 - 2011, 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 @@ -48,7 +48,7 @@ struct Curl_tree *Curl_splay(struct timeval i, N.smaller = N.larger = NULL; l = r = &N; - for (;;) { + for(;;) { comp = compare(i, t->key); if(comp < 0) { if(t->smaller == NULL) @@ -98,7 +98,7 @@ struct Curl_tree *Curl_splayinsert(struct timeval i, struct Curl_tree *t, struct Curl_tree *node) { - static struct timeval KEY_NOTUSED = {-1,-1}; /* key that will *NEVER* appear */ + static struct timeval KEY_NOTUSED = {-1,-1}; /* will *NEVER* appear */ if(node == NULL) return t; @@ -268,7 +268,7 @@ int Curl_splayremovebyaddr(struct Curl_tree *t, struct Curl_tree *removenode, struct Curl_tree **newroot) { - static struct timeval KEY_NOTUSED = {-1,-1}; /* key that will *NEVER* appear */ + static struct timeval KEY_NOTUSED = {-1,-1}; /* will *NEVER* appear */ struct Curl_tree *x; if(!t || !removenode) @@ -342,7 +342,7 @@ void Curl_splayprint(struct Curl_tree * t, int d, char output) return; Curl_splayprint(t->larger, d+1, output); - for (i=0; ikey.tv_usec, i); #else - fprintf(stderr, "%ld.%ld[%d]", (long)t->key.tv_sec, (long)t->key.tv_usec, i); + fprintf(stderr, "%ld.%ld[%d]", (long)t->key.tv_sec, + (long)t->key.tv_usec, i); #endif } @@ -391,7 +392,7 @@ int main(int argc, argv_item_t argv[]) int i; root = NULL; /* the empty tree */ - for (i = 0; i < MAX; i++) { + for(i = 0; i < MAX; i++) { struct timeval key; ptrs[i] = t = malloc(sizeof(struct Curl_tree)); if(!t) { @@ -418,7 +419,7 @@ int main(int argc, argv_item_t argv[]) #endif #if 1 - for (i = 0; i < MAX; i++) { + for(i = 0; i < MAX; i++) { int rem = (i+7)%MAX; struct Curl_tree *r; printf("Tree look:\n"); -- cgit v1.2.1