From e581b2ad1ed170f3b7f64b7db3d0f5c80c173437 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 30 Sep 2013 22:25:48 +0200 Subject: [PATCH] Initialize arrays at declaration, and remove use of deprecated bzero(). --- src/smpi/instr_smpi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/smpi/instr_smpi.c b/src/smpi/instr_smpi.c index 62a0d65701..4bb6e413ac 100644 --- a/src/smpi/instr_smpi.c +++ b/src/smpi/instr_smpi.c @@ -271,8 +271,7 @@ void TRACE_smpi_send(int rank, int src, int dst, int size) { if (!TRACE_smpi_is_enabled()) return; - char key[INSTR_DEFAULT_STR_SIZE]; - bzero (key, INSTR_DEFAULT_STR_SIZE); + char key[INSTR_DEFAULT_STR_SIZE] = {0}; TRACE_smpi_put_key(src, dst, key, INSTR_DEFAULT_STR_SIZE); char str[INSTR_DEFAULT_STR_SIZE]; @@ -287,8 +286,7 @@ void TRACE_smpi_recv(int rank, int src, int dst) { if (!TRACE_smpi_is_enabled()) return; - char key[INSTR_DEFAULT_STR_SIZE]; - bzero (key, INSTR_DEFAULT_STR_SIZE); + char key[INSTR_DEFAULT_STR_SIZE] = {0}; TRACE_smpi_get_key(src, dst, key, INSTR_DEFAULT_STR_SIZE); char str[INSTR_DEFAULT_STR_SIZE]; -- 2.20.1