From ab22af1d91b39e28cdab0ec0f49bccc4b80ece0a Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 19 Oct 2020 02:34:05 +0000 Subject: [PATCH] refactor --- src/util/inc/tkvstore.h | 3 +-- src/util/src/tkvstore.c | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/util/inc/tkvstore.h b/src/util/inc/tkvstore.h index 36acb83f69..3a7deb8e5d 100644 --- a/src/util/inc/tkvstore.h +++ b/src/util/inc/tkvstore.h @@ -21,8 +21,6 @@ extern "C" { #include -#define KVSTORE_FILE_VERSION ((uint32_t)0) - typedef int (*iterFunc)(void *, void *cont, int contLen); typedef void (*afterFunc)(void *); @@ -48,6 +46,7 @@ typedef struct { } SKVStore; #define KVSTORE_MAGIC(s) (s)->info.magic +#define KVSTORE_FILE_VERSION ((uint32_t)0) int tdCreateKVStore(char *fname); int tdDestroyKVStore(char *fname); diff --git a/src/util/src/tkvstore.c b/src/util/src/tkvstore.c index 776c8bc23c..fdd772f3ad 100644 --- a/src/util/src/tkvstore.c +++ b/src/util/src/tkvstore.c @@ -17,11 +17,6 @@ #define TAOS_RANDOM_FILE_FAIL_TEST -#include -#include -#include -#include - #include "os.h" #include "hash.h" #include "taoserror.h" @@ -33,7 +28,6 @@ #define TD_KVSTORE_HEADER_SIZE 512 #define TD_KVSTORE_MAJOR_VERSION 1 #define TD_KVSTORE_MAINOR_VERSION 0 -#define TD_KVSTORE_SNAP_SUFFIX ".snap" #define TD_KVSTORE_NEW_SUFFIX ".new" #define TD_KVSTORE_INIT_MAGIC 0xFFFFFFFF -- GitLab