diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-04-20 15:17:42 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-04-27 09:09:35 +0200 |
commit | b903186fa0189ff241d756d25d07fdfe9885ae49 (patch) | |
tree | bd942ac8753469172661b0d30153986378337fdf /lib/file.c | |
parent | 592eda8e3feb1bf8d0f85c2baa485323b315f9d9 (diff) | |
download | gnurl-b903186fa0189ff241d756d25d07fdfe9885ae49.tar.gz gnurl-b903186fa0189ff241d756d25d07fdfe9885ae49.tar.bz2 gnurl-b903186fa0189ff241d756d25d07fdfe9885ae49.zip |
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.
Diffstat (limited to 'lib/file.c')
-rw-r--r-- | lib/file.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/file.c b/lib/file.c index ad671233c..1fee92bb2 100644 --- a/lib/file.c +++ b/lib/file.c @@ -90,7 +90,8 @@ /* The last #include file should be: */ #include "memdebug.h" -#if defined(WIN32) || defined(MSDOS) || defined(__EMX__) || defined(__SYMBIAN32__) +#if defined(WIN32) || defined(MSDOS) || defined(__EMX__) || \ + defined(__SYMBIAN32__) #define DOS_FILESYSTEM 1 #endif @@ -245,18 +246,17 @@ static CURLcode file_connect(struct connectdata *conn, bool *done) actual_path = real_path; if((actual_path[0] == '/') && actual_path[1] && - (actual_path[2] == ':' || actual_path[2] == '|')) - { + (actual_path[2] == ':' || actual_path[2] == '|')) { actual_path[2] = ':'; actual_path++; } /* change path separators from '/' to '\\' for DOS, Windows and OS/2 */ - for (i=0; actual_path[i] != '\0'; ++i) + for(i=0; actual_path[i] != '\0'; ++i) if(actual_path[i] == '/') actual_path[i] = '\\'; - fd = open_readonly(actual_path, O_RDONLY|O_BINARY); /* no CR/LF translation */ + fd = open_readonly(actual_path, O_RDONLY|O_BINARY); file->path = actual_path; #else fd = open_readonly(real_path, O_RDONLY); @@ -536,7 +536,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) } /* A high water mark has been specified so we obey... */ - if (data->req.maxdownload > 0) + if(data->req.maxdownload > 0) expected_size = data->req.maxdownload; if(fstated && (expected_size == 0)) @@ -565,7 +565,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) if( nread > 0) buf[nread] = 0; - if (nread <= 0 || expected_size == 0) + if(nread <= 0 || expected_size == 0) break; bytecount += nread; |