Commit 55ce5d4b authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'logger_fix_sanitizer' into 'master'

Logger: fix sanitizer

See merge request !973
parents bc9f1726 8bfcd347
......@@ -154,6 +154,9 @@ void header_read(struct header *h, struct logger_logfile *log) {
/* Allocate the masks memory. */
h->masks = malloc(sizeof(struct mask_data) * h->masks_count);
if (h->masks == NULL) {
error("Failed to allocate the memory for the masks.");
}
/* Loop over all masks. */
h->timestamp_mask = 0;
......
......@@ -217,7 +217,7 @@ void logger_write_index_file(struct logger_writer* log, struct engine* e) {
size_t cur_pos = ftell(f);
size_t d_align = ((cur_pos + 7) & ~7) - cur_pos;
if (d_align > 0) {
int tmp = 0;
long int tmp = 0;
/* Fill the memory with garbage */
fwrite(&tmp, d_align, 1, f);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment