Changeset: 8983d9da720b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/8983d9da720b Modified Files: sql/storage/bat/bat_storage.c Branch: Jul2021 Log Message:
Use memset function
diffs (27 lines):
diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -1121,9 +1121,8 @@ cs_update_bat( sql_trans *tr, column_sto
else {
BATsetcount(ins, ucnt); /* all full updates */
msk =
(int*)Tloc(ins, 0);
- int end = (int)
((ucnt+31)/32);
- for (int i=0;
i<end; i++)
- msk[i]
= 0;
+ BUN end =
(ucnt+31)/32;
+ memset(msk, 0,
end * sizeof(int));
}
}
for (oid i = 0, rid = start;
rid < lend && res == LOG_OK; rid++, i++) {
@@ -1165,9 +1164,8 @@ cs_update_bat( sql_trans *tr, column_sto
} else {
BATsetcount(ins, ucnt); /* all full updates */
msk =
(int*)Tloc(ins, 0);
- int end = (int)
((ucnt+31)/32);
- for (int i=0;
i<end; i++)
- msk[i]
= 0;
+ BUN end =
(ucnt+31)/32;
+ memset(msk, 0,
end * sizeof(int));
}
}
ptr upd = BUNtail(upi, i);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list
