]> mj.ucw.cz Git - libucw.git/commitdiff
tiny optimization: do not make 2 function calls in adler32()
authorRobert Spalek <robert@ucw.cz>
Tue, 20 Jul 2004 10:15:31 +0000 (10:15 +0000)
committerRobert Spalek <robert@ucw.cz>
Tue, 20 Jul 2004 10:15:31 +0000 (10:15 +0000)
lib/adler32.c
lib/lizard.h

index 589c0f7d938bb55ddd84fd38279831518d7107c9..903cb1cee189d78a97821f7a0e227d7167896754 100644 (file)
@@ -46,9 +46,3 @@ update_adler32(uns adler, byte *buf, uns len)
   }
   return (s2 << 16) | s1;
 }
-
-uns
-adler32(byte *buf, uns len)
-{
-  return update_adler32(1, buf, len);
-}
index c701e6f2bcb589d2ecfa4fdaab86f1ebd988f976..bc7f317ea15f86aac9672b1bfa6714f1dd470404 100644 (file)
@@ -39,6 +39,11 @@ byte *lizard_decompress_safe(byte *in, struct lizard_buffer *buf, uns expected_l
 
 /* adler32.c */
 uns update_adler32(uns adler, byte *ptr, uns len);
-uns adler32(byte *ptr, uns len);
+
+static inline uns
+adler32(byte *buf, uns len)
+{
+  return update_adler32(1, buf, len);
+}
 
 #endif