[or-cvs] fix tab/space in torgzip.c

Nick Mathewson nickm at seul.org
Thu Oct 14 04:24:44 UTC 2004


Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv11326/src/common

Modified Files:
	torgzip.c 
Log Message:
fix tab/space in torgzip.c

Index: torgzip.c
===================================================================
RCS file: /home/or/cvsroot/src/common/torgzip.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- torgzip.c	8 Sep 2004 06:47:33 -0000	1.2
+++ torgzip.c	14 Oct 2004 04:24:42 -0000	1.3
@@ -46,7 +46,7 @@
 
 int
 tor_gzip_compress(char **out, size_t *out_len,
-		  const char *in, size_t in_len,
+                  const char *in, size_t in_len,
                   compress_method_t method)
 {
   struct z_stream_s *stream = NULL;
@@ -71,10 +71,10 @@
   stream->avail_in = in_len;
 
   if (deflateInit2(stream, Z_BEST_COMPRESSION, Z_DEFLATED,
-		   method_bits(method),
-		   8, Z_DEFAULT_STRATEGY) != Z_OK) {
+                   method_bits(method),
+                   8, Z_DEFAULT_STRATEGY) != Z_OK) {
     log_fn(LOG_WARN, "Error from deflateInit2: %s",
-	   stream->msg?stream->msg:"<no message>");
+           stream->msg?stream->msg:"<no message>");
     goto err;
   }
 
@@ -95,12 +95,12 @@
         if (stream->avail_out >= stream->avail_in+16)
           break;
       case Z_BUF_ERROR:
-	offset = stream->next_out - ((unsigned char*)*out);
-	out_size *= 2;
-	*out = tor_realloc(*out, out_size);
-	stream->next_out = *out + offset;
-	stream->avail_out = out_size - offset;
-	break;
+        offset = stream->next_out - ((unsigned char*)*out);
+        out_size *= 2;
+        *out = tor_realloc(*out, out_size);
+        stream->next_out = *out + offset;
+        stream->avail_out = out_size - offset;
+        break;
       default:
         log_fn(LOG_WARN, "Gzip compression didn't finish: %s",
                stream->msg ? stream->msg : "<no message>");
@@ -129,7 +129,7 @@
 
 int
 tor_gzip_uncompress(char **out, size_t *out_len,
-		    const char *in, size_t in_len,
+                    const char *in, size_t in_len,
                     compress_method_t method)
 {
   struct z_stream_s *stream = NULL;
@@ -156,7 +156,7 @@
   if (inflateInit2(stream,
                    method_bits(method)) != Z_OK) {
     log_fn(LOG_WARN, "Error from inflateInit2: %s",
-	   stream->msg?stream->msg:"<no message>");
+           stream->msg?stream->msg:"<no message>");
     goto err;
   }
 
@@ -171,22 +171,22 @@
     switch(inflate(stream, Z_FINISH))
       {
       case Z_STREAM_END:
-	goto done;
+        goto done;
       case Z_OK:
-	/* In case zlib doesn't work as I think.... */
-	if (stream->avail_out >= stream->avail_in+16)
-	  break;
+        /* In case zlib doesn't work as I think.... */
+        if (stream->avail_out >= stream->avail_in+16)
+          break;
       case Z_BUF_ERROR:
-	offset = stream->next_out - ((unsigned char*)*out);
-	out_size *= 2;
-	*out = tor_realloc(*out, out_size);
-	stream->next_out = *out + offset;
-	stream->avail_out = out_size - offset;
-	break;
+        offset = stream->next_out - ((unsigned char*)*out);
+        out_size *= 2;
+        *out = tor_realloc(*out, out_size);
+        stream->next_out = *out + offset;
+        stream->avail_out = out_size - offset;
+        break;
       default:
-	log_fn(LOG_WARN, "Gzip decompression returned an error: %s",
-	       stream->msg ? stream->msg : "<no message>");
-	goto err;
+        log_fn(LOG_WARN, "Gzip decompression returned an error: %s",
+               stream->msg ? stream->msg : "<no message>");
+        goto err;
       }
 
   }



More information about the tor-commits mailing list