diff options
Diffstat (limited to 'daemons/cmirrord/functions.c')
-rw-r--r-- | daemons/cmirrord/functions.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c index 3e8fd202..f6e09180 100644 --- a/daemons/cmirrord/functions.c +++ b/daemons/cmirrord/functions.c @@ -235,11 +235,9 @@ static int rw_log(struct log_c *lc, int do_write) */ static int read_log(struct log_c *lc) { - struct log_header lh; + struct log_header lh = { 0 }; size_t bitset_size; - memset(&lh, 0, sizeof(struct log_header)); - if (rw_log(lc, 0)) return -EIO; /* Failed disk read */ @@ -1724,14 +1722,12 @@ int do_request(struct clog_request *rq, int server) static void print_bits(dm_bitset_t bs, int print) { int i, size; - char outbuf[128]; + char outbuf[128] = { 0 }; unsigned char *buf = (unsigned char *)(bs + 1); size = (*bs % 8) ? 1 : 0; size += (*bs / 8); - memset(outbuf, 0, sizeof(outbuf)); - for (i = 0; i < size; i++) { if (!(i % 16)) { if (outbuf[0] != '\0') { |