summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/glusterfs.h
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-21 18:56:24 +0300
committerAmar Tumballi <amarts@redhat.com>2018-08-25 17:10:11 +0000
commit14ee864f8b573d1bccf4f586450947ba4aa690a9 (patch)
treeff5f153f1fa229ed018f9f8e3fd3141a07b5709b /libglusterfs/src/glusterfs.h
parent7e229cf1d5d4c0600f0763dac3acacb1b950fc3b (diff)
multiple files: move from strlen() to sizeof()
{ec-heal|ec-combine|ec-helpers|ec-inode-read}.c For const strings, just do compile time size calc instead of runtime. Compile-tested only! Change-Id: If92ba0a7a20f64b898d01c6e3b6708190ca93e04 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'libglusterfs/src/glusterfs.h')
-rw-r--r--libglusterfs/src/glusterfs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 7dd3b06a468..1fae5e7c1be 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -90,6 +90,9 @@
#define GLUSTERD_MAX_SNAP_NAME 255
#define GLUSTERFS_SOCKET_LISTEN_BACKLOG 10
+
+#define SLEN(str) (sizeof(str) - 1)
+
#define ZR_MOUNTPOINT_OPT "mountpoint"
#define ZR_ATTR_TIMEOUT_OPT "attribute-timeout"
#define ZR_ENTRY_TIMEOUT_OPT "entry-timeout"