]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: compression: remove calls to SLZ init functions
authorWilly Tarreau <w@1wt.eu>
Thu, 22 Apr 2021 12:43:49 +0000 (14:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 22 Apr 2021 14:11:19 +0000 (16:11 +0200)
As we now embed the library we don't need to support the older 1.0 API
any more, so we can remove the explicit calls to slz_make_crc_table()
and slz_prepare_dist_table().

include/import/slz.h
src/compression.c
src/slz.c

index cbbefb7a3c9b55b3cc7507c34168f7b77d8c25c4..0251a855fa58797278766180925c8edfa324f92d 100644 (file)
@@ -84,13 +84,11 @@ struct slz_stream {
 };
 
 /* Functions specific to rfc1951 (deflate) */
-void slz_prepare_dist_table(); /* obsolete, not needed anymore */
 long slz_rfc1951_encode(struct slz_stream *strm, unsigned char *out, const unsigned char *in, long ilen, int more);
 int slz_rfc1951_init(struct slz_stream *strm, int level);
 int slz_rfc1951_finish(struct slz_stream *strm, unsigned char *buf);
 
 /* Functions specific to rfc1952 (gzip) */
-void slz_make_crc_table(void); /* obsolete, not needed anymore */
 uint32_t slz_crc32_by1(uint32_t crc, const unsigned char *buf, int len);
 uint32_t slz_crc32_by4(uint32_t crc, const unsigned char *buf, int len);
 long slz_rfc1952_encode(struct slz_stream *strm, unsigned char *out, const unsigned char *in, long ilen, int more);
index 28eb654290898fdf2b07d910998d90648f120666..911d0ac5aa5df8112a1209908c6e45496c49b86f 100644 (file)
@@ -708,11 +708,6 @@ INITCALL1(STG_REGISTER, cfg_register_keywords, &cfg_kws);
 __attribute__((constructor))
 static void __comp_fetch_init(void)
 {
-#ifdef USE_SLZ
-       slz_make_crc_table();
-       slz_prepare_dist_table();
-#endif
-
 #if defined(USE_ZLIB) && defined(DEFAULT_MAXZLIBMEM)
        global.maxzlibmem = DEFAULT_MAXZLIBMEM * 1024U * 1024U;
 #endif
index ddba74126020300ac0390fc77782ae9fb06129b2..db261f8e78bdc69dbeed6778041c1221f79d80c2 100644 (file)
--- a/src/slz.c
+++ b/src/slz.c
@@ -1304,18 +1304,6 @@ int slz_rfc1950_finish(struct slz_stream *strm, unsigned char *buf)
        return strm->outbuf - buf;
 }
 
-/* This used to be the function called to build the CRC table at init time.
- * Now it does nothing, it's only kept for API/ABI compatibility.
- */
-void slz_make_crc_table(void)
-{
-}
-
-/* does nothing anymore, only kept for ABI compatibility */
-void slz_prepare_dist_table()
-{
-}
-
 __attribute__((constructor))
 static void __slz_initialize(void)
 {