diff src/dmgrowbuf.c @ 2414:69a5af2eb1ea

Remove useless dmMemset().
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 13 Jan 2020 23:27:01 +0200
parents c801995cbb13
children c6ee41fd98dd
line wrap: on
line diff
--- a/src/dmgrowbuf.c	Mon Jan 13 23:20:56 2020 +0200
+++ b/src/dmgrowbuf.c	Mon Jan 13 23:27:01 2020 +0200
@@ -22,7 +22,7 @@
     if (buf == NULL)
         return DMERR_NULLPTR;
 
-    dmMemset(buf, 0, sizeof(DMGrowBuf));
+    memset(buf, 0, sizeof(DMGrowBuf));
 
     return DMERR_OK;
 }
@@ -68,7 +68,7 @@
             return;
 
         dmFree(buf->data);
-        dmMemset(buf, 0, sizeof(DMGrowBuf));
+        memset(buf, 0, sizeof(DMGrowBuf));
     }
 }
 
@@ -90,14 +90,14 @@
     if ((dst->data = dmMalloc(dst->size)) == NULL)
     {
         // If that fails, clear the struct
-        dmMemset(dst, 0, sizeof(DMGrowBuf));
+        memset(dst, 0, sizeof(DMGrowBuf));
         return NULL;
     }
 
     // Copy data
     memcpy(dst->data, src->data, src->size);
     if (enlarge > 0)
-        dmMemset(dst->data + src->size, 0, enlarge);
+        memset(dst->data + src->size, 0, enlarge);
 
     // And reset some struct information
     dst->is_const = FALSE;
@@ -204,9 +204,9 @@
     if (clear)
     {
         if (buf->backwards)
-            dmMemset(buf->data, 0, clrsize);
+            memset(buf->data, 0, clrsize);
         else
-            dmMemset(buf->data + buf->size, 0, clrsize);
+            memset(buf->data + buf->size, 0, clrsize);
     }
 
     buf->size = nsize;