From: Paul Cruz Date: Mon, 19 Jun 2017 21:07:56 +0000 (-0700) Subject: changed if statement styling X-Git-Tag: v1.3.0~1^2~15^2~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34f4e5cab24c202226a523bc7a88f1c05234c61d;p=thirdparty%2Fzstd.git changed if statement styling --- diff --git a/tests/decodecorpus.c b/tests/decodecorpus.c index 610df7cb4..ffaad4a17 100644 --- a/tests/decodecorpus.c +++ b/tests/decodecorpus.c @@ -674,7 +674,7 @@ static U32 generateSequences(U32* seed, frame_t* frame, seqStore_t* seqStore, MIN(frame->header.windowSize, (size_t)((BYTE*)srcPtr - (BYTE*)frame->srcStart))) + 1; - if(genDict && (RAND(seed) & 1)) { + if (genDict && (RAND(seed) & 1)) { /* need to occasionally generate offsets that go past the start */ /* we still need to be within the windowSize however */ U32 const lenPastStart = RAND(seed) % dictSize; @@ -703,7 +703,7 @@ static U32 generateSequences(U32* seed, frame_t* frame, seqStore_t* seqStore, /* copy from dictionary instead of literals */ *srcPtr = *(dictContent + dictSize - (offset-(srcPtr-(BYTE*)frame->srcStart))); } - else{ + else { *srcPtr = *(srcPtr-offset); } srcPtr++; @@ -1399,13 +1399,13 @@ static int generateCorpusWithDict(U32 seed, unsigned numFiles, const char* const } free(samples); free(sampleSizes); - if(dictWriteSize != dictSize && ZDICT_isError(dictWriteSize)){ + if (dictWriteSize != dictSize && ZDICT_isError(dictWriteSize)) { DISPLAY("Could not finalize dictionary: %s\n", ZDICT_getErrorName(dictWriteSize)); free(fullDict); return 1; } /* write out dictionary */ - if(snprintf(outPath, MAX_PATH, "%s/dictionary", path) + 1 > MAX_PATH){ + if (snprintf(outPath, MAX_PATH, "%s/dictionary", path) + 1 > MAX_PATH) { DISPLAY("Error: dictionary path too long\n"); free(fullDict); return 1;