]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
code cleaning
authorinikep <inikep@gmail.com>
Thu, 5 May 2016 11:58:56 +0000 (13:58 +0200)
committerinikep <inikep@gmail.com>
Thu, 5 May 2016 11:58:56 +0000 (13:58 +0200)
lib/common/util.h
programs/bench.c
programs/dibio.c
programs/fileio.c
programs/fullbench.c
programs/paramgrill.c

index 4f73323b880c038f9ebc8b94be428c17a6c74c5b..61b542957fe6a878753cfa562b3fc1a3e9ff5297 100644 (file)
@@ -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<nbNames; i++) {
+    for (i=0, pbuf = buf; i<nbNames; i++) {
         if (UTIL_doesFileExists(inputNames[i])) {
        // printf ("UTIL_doesFileExists=[%s]\n", inputNames[i]);
             size_t len = strlen(inputNames[i]);
@@ -347,7 +347,7 @@ UTIL_STATIC int UTIL_createFileList(const char **inputNames, unsigned nbNames, u
     }
 
     {   const char** fileTable = (const char**)malloc((nbFiles+1) * sizeof(const char*));
-               if (!fileTable) { free(buf); *filenameTable = NULL; return 0; }
+        if (!fileTable) { free(buf); *filenameTable = NULL; return 0; }
 
         if (nbFiles == 0)
             fileTable[0] = buf;
index 513562185fd5ac1a6bbf5110588a6e981c6c0f9e..5ea73be522a0bb12741d1dcee7d2cf35c20638bc 100644 (file)
@@ -26,7 +26,7 @@
 /* *************************************
 *  Includes
 ***************************************/
-#include "util.h"        /* UTIL_GetFileSize */
+#include "util.h"        /* Compiler options, UTIL_GetFileSize, UTIL_createFileList, UTIL_sleep */
 #include <stdlib.h>      /* malloc, free */
 #include <string.h>      /* memset */
 #include <stdio.h>       /* fprintf, fopen, ftello64 */
 #include "xxhash.h"
 
 
-/* *************************************
-*  Compiler specifics
-***************************************/
-#if defined(_MSC_VER)
-
-#elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
-  /* part of <stdio.h> */
-#else
-  extern int snprintf (char* s, size_t maxlen, const char* format, ...);   /* not declared in <stdio.h> when C version < c99 */
-#endif
-
 
 /* *************************************
 *  Constants
index 2fea36493f44e3369e8e121c871a5420f0505752..7aad114d5fa2532182d5108f3ffe3b1c4b1f6a6c 100644 (file)
@@ -25,7 +25,7 @@
 /*-*************************************
 *  Includes
 ***************************************/
-#include "util.h"           /* UTIL_GetFileSize */
+#include "util.h"           /* Compiler options, UTIL_GetFileSize, UTIL_getTotalFileSize */
 #include <stdlib.h>         /* malloc, free */
 #include <string.h>         /* memset */
 #include <stdio.h>          /* fprintf, fopen, ftello64 */
index a90f7eeb3eadf8e4c372bfbd0d7df28c5dc944b9..e9d78b60193185109cfce545940d0d3357003b37 100644 (file)
@@ -47,7 +47,7 @@
 /*-*************************************
 *  Includes
 ***************************************/
-#include "util.h"       /* UTIL_GetFileSize */
+#include "util.h"       /* Compiler options, UTIL_GetFileSize */
 #include <stdio.h>      /* fprintf, fopen, fread, _fileno, stdin, stdout */
 #include <stdlib.h>     /* malloc, free */
 #include <string.h>     /* strcmp, strlen */
index d9707800bffdddba7c4727cbd1cd34ab8e0ae145..6f5d6a782c6c9e53159a6962e2d538b884067afa 100644 (file)
 /*_************************************
 *  Includes
 **************************************/
-#include "util.h"         /* UTIL_GetFileSize */
-#include <stdlib.h>       /* malloc */
-#include <stdio.h>        /* fprintf, fopen, ftello64 */
-#include <string.h>       /* strcmp */
-#include <time.h>         /* clock_t, clock, CLOCKS_PER_SEC */
+#include "util.h"        /* Compiler options, UTIL_GetFileSize */
+#include <stdlib.h>      /* malloc */
+#include <stdio.h>       /* fprintf, fopen, ftello64 */
+#include <string.h>      /* strcmp */
+#include <time.h>        /* clock_t, clock, CLOCKS_PER_SEC */
 
 #include "mem.h"
 #include "zstd_static.h"
index 05400d2f0421b05b0901b2f7df168928a02ce7ac..0a0824adcf68e5d7803cbda2127a6f72eb1248b1 100644 (file)
@@ -34,7 +34,7 @@
 /*-************************************
 *  Dependencies
 **************************************/
-#include "util.h"         /* UTIL_GetFileSize */
+#include "util.h"         /* Compiler options, UTIL_GetFileSize */
 #include <stdlib.h>       /* malloc */
 #include <stdio.h>        /* fprintf, fopen, ftello64 */
 #include <string.h>       /* strcmp */