From: inikep Date: Thu, 5 May 2016 11:58:56 +0000 (+0200) Subject: code cleaning X-Git-Tag: v0.6.1^2~14^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13c8424ea017e069194d16c3385a34383095c977;p=thirdparty%2Fzstd.git code cleaning --- diff --git a/lib/common/util.h b/lib/common/util.h index 4f73323b8..61b542957 100644 --- a/lib/common/util.h +++ b/lib/common/util.h @@ -330,10 +330,10 @@ UTIL_STATIC int UTIL_createFileList(const char **inputNames, unsigned nbNames, u char *pbuf, *bufend, *buf; buf = (char*)malloc(maxListSize); - if (!buf) { *filenameTable = NULL; return 0; } + if (!buf) { *filenameTable = NULL; return 0; } bufend = buf + maxListSize; - for (i=0, pbuf = buf; i /* malloc, free */ #include /* memset */ #include /* fprintf, fopen, ftello64 */ @@ -37,17 +37,6 @@ #include "xxhash.h" -/* ************************************* -* Compiler specifics -***************************************/ -#if defined(_MSC_VER) - -#elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) - /* part of */ -#else - extern int snprintf (char* s, size_t maxlen, const char* format, ...); /* not declared in when C version < c99 */ -#endif - /* ************************************* * Constants diff --git a/programs/dibio.c b/programs/dibio.c index 2fea36493..7aad114d5 100644 --- a/programs/dibio.c +++ b/programs/dibio.c @@ -25,7 +25,7 @@ /*-************************************* * Includes ***************************************/ -#include "util.h" /* UTIL_GetFileSize */ +#include "util.h" /* Compiler options, UTIL_GetFileSize, UTIL_getTotalFileSize */ #include /* malloc, free */ #include /* memset */ #include /* fprintf, fopen, ftello64 */ diff --git a/programs/fileio.c b/programs/fileio.c index a90f7eeb3..e9d78b601 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -47,7 +47,7 @@ /*-************************************* * Includes ***************************************/ -#include "util.h" /* UTIL_GetFileSize */ +#include "util.h" /* Compiler options, UTIL_GetFileSize */ #include /* fprintf, fopen, fread, _fileno, stdin, stdout */ #include /* malloc, free */ #include /* strcmp, strlen */ diff --git a/programs/fullbench.c b/programs/fullbench.c index d9707800b..6f5d6a782 100644 --- a/programs/fullbench.c +++ b/programs/fullbench.c @@ -25,11 +25,11 @@ /*_************************************ * Includes **************************************/ -#include "util.h" /* UTIL_GetFileSize */ -#include /* malloc */ -#include /* fprintf, fopen, ftello64 */ -#include /* strcmp */ -#include /* clock_t, clock, CLOCKS_PER_SEC */ +#include "util.h" /* Compiler options, UTIL_GetFileSize */ +#include /* malloc */ +#include /* fprintf, fopen, ftello64 */ +#include /* strcmp */ +#include /* clock_t, clock, CLOCKS_PER_SEC */ #include "mem.h" #include "zstd_static.h" diff --git a/programs/paramgrill.c b/programs/paramgrill.c index 05400d2f0..0a0824adc 100644 --- a/programs/paramgrill.c +++ b/programs/paramgrill.c @@ -34,7 +34,7 @@ /*-************************************ * Dependencies **************************************/ -#include "util.h" /* UTIL_GetFileSize */ +#include "util.h" /* Compiler options, UTIL_GetFileSize */ #include /* malloc */ #include /* fprintf, fopen, ftello64 */ #include /* strcmp */