From b3c8b2f846cc16b45a61783ca6b9d3247f8ed61c Mon Sep 17 00:00:00 2001 From: Leon Arber Date: Mon, 25 Apr 2005 14:15:22 -0500 Subject: [svn-r10659] Purpose: Optimization Description: removed an unncessary memset call. Solution: Platforms tested: heping (pp), sol (pp) Misc. update: --- tools/lib/h5diff_util.c | 4 ++-- tools/lib/ph5diff.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 3f96434..4f1e97c 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -59,8 +59,8 @@ void parallel_print(const char* format, ...) if((bytes_written+1) == (OUTBUFF_SIZE-outBuffOffset)) #endif { - /* Delete the characters that were written to outBuff since they will be written to the overflow_file */ - memset(outBuff+outBuffOffset, 0, OUTBUFF_SIZE - outBuffOffset); + /* Terminate the outbuff at the end of the previous output */ + outBuff[outBuffOffset] = '\0'; overflow_file = HDtmpfile(); if(overflow_file == NULL) diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h index 911f354..b8b38b2 100644 --- a/tools/lib/ph5diff.h +++ b/tools/lib/ph5diff.h @@ -15,7 +15,6 @@ #ifndef _PH5DIFF_H__ #define _PH5DIFF_H__ - #define PRINT_DATA_MAX_SIZE 512 #define OUTBUFF_SIZE PRINT_DATA_MAX_SIZE*4 /* Send from manager to workers */ -- cgit v0.12