From: Arnaud Giersch Date: Mon, 30 Sep 2013 20:25:48 +0000 (+0200) Subject: Initialize arrays at declaration, and remove use of deprecated bzero(). X-Git-Tag: v3_9_90~60^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e581b2ad1ed170f3b7f64b7db3d0f5c80c173437 Initialize arrays at declaration, and remove use of deprecated bzero(). --- 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];