summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-06-04 09:56:33 +0530
committerAnand Avati <avati@redhat.com>2012-06-03 22:13:02 -0700
commitba60970485e06d70ed4b973a1386e0601c49a86d (patch)
treed36d53c9b2aa236e13218c23a888846c685302db /libglusterfs
parent2ec55e40aee7ba0905b4e1eafbbff07bfbba15a5 (diff)
libglusterfs: valid_host_name() fix
Fix valid_host_name() to allow single character hostnames. Change-Id: I72527ecedec52fa47336d95b0586eb18dac6273d BUG: 827403 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3508 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/common-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index c9c396762ab..280cf218969 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -1644,7 +1644,7 @@ valid_host_name (char *address, int length)
char *temp_str = NULL;
char *save_ptr = NULL;
- if ((length > _POSIX_HOST_NAME_MAX) || (length == 1)) {
+ if ((length > _POSIX_HOST_NAME_MAX) || (length < 1)) {
ret = 0;
goto out;
}