summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/glusterfs/store.h
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-11-25 15:37:46 +0200
committerAmar Tumballi <amarts@gmail.com>2019-11-27 07:18:51 +0000
commitd97f78467849eef92559217b48d2158521cbba5f (patch)
tree93ba59c9c6ad6bcf1818489a6cde7daf9aaa60b6 /libglusterfs/src/glusterfs/store.h
parentd60935d1011e387115e0445629976196f566b3b1 (diff)
store.c/glusterd-store.c: remove sys_stat calls
Instead of querying for the file size and allocating a char array according to its size, let's just use a fixed size. Those calls are not really needed, and are either expensive or cached anyway. Since we do dynamic allocation/free, let's just use a fixed array instead. I'll see if there are other sys_stat() calls that are not really useful and try to eliminate them in separate patches. Change-Id: I76b40e78a52ab38f613fc0cdef4be60e6253bf20 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'libglusterfs/src/glusterfs/store.h')
-rw-r--r--libglusterfs/src/glusterfs/store.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/glusterfs/store.h b/libglusterfs/src/glusterfs/store.h
index 6e6e3b9ad6d..c8be544e164 100644
--- a/libglusterfs/src/glusterfs/store.h
+++ b/libglusterfs/src/glusterfs/store.h
@@ -59,8 +59,8 @@ int32_t
gf_store_unlink_tmppath(gf_store_handle_t *shandle);
int
-gf_store_read_and_tokenize(FILE *file, char *str, int size, char **iter_key,
- char **iter_val, gf_store_op_errno_t *store_errno);
+gf_store_read_and_tokenize(FILE *file, char **iter_key, char **iter_val,
+ gf_store_op_errno_t *store_errno);
int32_t
gf_store_retrieve_value(gf_store_handle_t *handle, char *key, char **value);