diff src/dmzlib.c @ 2414:69a5af2eb1ea

Remove useless dmMemset().
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 13 Jan 2020 23:27:01 +0200
parents 36edd316184a
children 8d8197b3d052
line wrap: on
line diff
--- a/src/dmzlib.c	Mon Jan 13 23:20:56 2020 +0200
+++ b/src/dmzlib.c	Mon Jan 13 23:27:01 2020 +0200
@@ -92,8 +92,8 @@
     int i, k = 0;
     int code, nextCode[16], sizes[17];
 
-    dmMemset(sizes, 0, sizeof(sizes));
-    dmMemset(ctx->fast, 0, sizeof(ctx->fast));
+    memset(sizes, 0, sizeof(sizes));
+    memset(ctx->fast, 0, sizeof(ctx->fast));
 
     for (i = 0; i < num; i++)
         sizes[sizelist[i]]++;
@@ -412,7 +412,7 @@
 
     // Get lengths table (uninitialized entries should be set to 0)
     codeLengths[256] = 0;
-    dmMemset(codeLengthSizes, 0, sizeof(codeLengthSizes));
+    memset(codeLengthSizes, 0, sizeof(codeLengthSizes));
     for (i = 0; i < hclen; i++)
     {
         int s = dmZReceive(ctx, 3);
@@ -447,20 +447,20 @@
                 return dmErrorDBG(DMERR_INVALID_DATA,
                     "Invalid bit length repeat.\n");
             }
-            dmMemset(codeLengths + n, codeLengths[n - 1], bv);
+            memset(codeLengths + n, codeLengths[n - 1], bv);
             n += bv;
         }
         else
         if (c == 17)
         {
             int bv = dmZReceive(ctx, 3) + 3;
-            dmMemset(codeLengths + n, 0, bv);
+            memset(codeLengths + n, 0, bv);
             n += bv;
         }
         else
         {
             int bv = dmZReceive(ctx, 7) + 11;
-            dmMemset(codeLengths + n, 0, bv);
+            memset(codeLengths + n, 0, bv);
             n += bv;
         }
     }
@@ -562,7 +562,7 @@
     if (ctx == NULL)
         return DMERR_NULLPTR;
 
-    dmMemset(ctx, 0, sizeof(DMZLibContext));
+    memset(ctx, 0, sizeof(DMZLibContext));
     return DMERR_OK;
 }
 
@@ -571,7 +571,7 @@
 {
     if (ctx != NULL)
     {
-        dmMemset(ctx, 0, sizeof(DMZLibContext));
+        memset(ctx, 0, sizeof(DMZLibContext));
     }
 }