Changeset: a9b19cab5551 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a9b19cab5551
Modified Files:
        gdk/gdk_strimps.c
Branch: Jun2023
Log Message:

use zalloc to initialize with zero's


diffs (20 lines):

diff --git a/gdk/gdk_strimps.c b/gdk/gdk_strimps.c
--- a/gdk/gdk_strimps.c
+++ b/gdk/gdk_strimps.c
@@ -309,15 +309,10 @@ STRMPbuildHeader(BAT *b, BAT *s, CharPai
        }
 
        hlen = STRIMP_HISTSIZE;
-       if ((hist = (PairHistogramElem 
*)GDKmalloc(hlen*sizeof(PairHistogramElem))) == NULL) {
+       if ((hist = (PairHistogramElem 
*)GDKzalloc(hlen*sizeof(PairHistogramElem))) == NULL) {
                return false;
        }
 
-       for(hidx = 0; hidx < hlen; hidx++) {
-               hist[hidx].p = NULL;
-               hist[hidx].cnt = 0;
-       }
-
        // Create Histogram
        bi = bat_iterator(b);
        pip = &pi;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to