[Reconnoiter-devel] [reconnoiter commit] r851 - trunk/src

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Thu Sep 17 20:24:35 EDT 2009


Author: jesus
Date: 2009-09-17 20:24:34 -0400 (Thu, 17 Sep 2009)
New Revision: 851

Modified:
   trunk/src/noit_http.c
Log:
indentiation changes only, functional change

Modified: trunk/src/noit_http.c
===================================================================
--- trunk/src/noit_http.c	2009-09-18 00:23:15 UTC (rev 850)
+++ trunk/src/noit_http.c	2009-09-18 00:24:34 UTC (rev 851)
@@ -808,32 +808,31 @@
   CTX_LEADER_APPEND("\r\n", 2);
   return len;
 }
-/* memgzip */
 static int memgzip2(Bytef *dest, uLongf *destLen,
                     const Bytef *source, uLong sourceLen, int level) {
-    z_stream stream;
-    int err;
+  z_stream stream;
+  int err;
 
-    memset(&stream, 0, sizeof(stream));
-    stream.next_in = (Bytef*)source;
-    stream.avail_in = (uInt)sourceLen;
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
+  memset(&stream, 0, sizeof(stream));
+  stream.next_in = (Bytef*)source;
+  stream.avail_in = (uInt)sourceLen;
+  stream.next_out = dest;
+  stream.avail_out = (uInt)*destLen;
+  if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
 
-    err = deflateInit2(&stream, level, Z_DEFLATED, 15+16, 8,
-                       Z_DEFAULT_STRATEGY);
-    if (err != Z_OK) return err;
+  err = deflateInit2(&stream, level, Z_DEFLATED, 15+16, 8,
+                     Z_DEFAULT_STRATEGY);
+  if (err != Z_OK) return err;
 
-    err = deflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        deflateEnd(&stream);
-        return err == Z_OK ? Z_BUF_ERROR : err;
-    }
-    *destLen = stream.total_out;
+  err = deflate(&stream, Z_FINISH);
+  if (err != Z_STREAM_END) {
+    deflateEnd(&stream);
+    return err == Z_OK ? Z_BUF_ERROR : err;
+  }
+  *destLen = stream.total_out;
 
-    err = deflateEnd(&stream);
-    return err;
+  err = deflateEnd(&stream);
+  return err;
 }
 static noit_boolean
 _http_encode_chain(struct bchain *out, struct bchain *in, int opts) {



More information about the Reconnoiter-devel mailing list