From e648a291b02298d2f1063cedaad9a58614ebe0ad Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 13 Jul 2017 08:10:27 -0400 Subject: core: miscellaneous cleanup clean up things that I tripped over doing other changes. 1) fix mishmash of random spacing in struct decls in glusterfs.h. Not technically a problem, just ugly to look at. 2) replace open-coded strings constants with existing #define constants. A disaster waiting to happen. 3) Use sys_access() instead of sys_stat() or sys_lstat() to test simple existence of file. Why copy dozens of bytes from kernel to user space that aren't going to be used by anything? There are probably more instances like these. Change-Id: I28089bef4cc93d5e4e4213045fb1a2649d110f82 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: https://review.gluster.org/17769 Smoke: Gluster Build System Reviewed-by: Prashanth Pai CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/mgmt/glusterd/src/glusterd-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index cf50e82e849..fce56b12e9c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -39,7 +39,7 @@ int32_t i = 0; \ \ if (!get_opt && (!strcmp (key, "all") || \ - !strcmp (key, "cluster.max-op-version"))) { \ + !strcmp (key, GLUSTERD_MAX_OP_VERSION_KEY))) {\ ret = -1; \ *op_errstr = gf_strdup ("Not a valid option to set"); \ goto out; \ -- cgit