From 54e73b1072d509c47c7b2665ab1f463081a96edb Mon Sep 17 00:00:00 2001 From: Jiaqiang Xu Date: Fri, 16 Oct 2015 15:27:02 +0800 Subject: [PATCH] [client] Fix compilation on windows. --- lib/utils.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/utils.c b/lib/utils.c index d9cf65b42..5bc4f9985 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -1064,26 +1064,6 @@ is_uuid_valid (const char *uuid_str) return TRUE; } -gboolean -is_object_id_valid (const char *obj_id) -{ - int len = strlen(obj_id); - int i; - char c; - - if (len != 40) - return FALSE; - - for (i = 0; i < len; ++i) { - c = obj_id[i]; - if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f')) - continue; - return FALSE; - } - - return TRUE; -} - #else char* gen_uuid () { @@ -1120,6 +1100,26 @@ is_uuid_valid (const char *uuid_str) #endif +gboolean +is_object_id_valid (const char *obj_id) +{ + int len = strlen(obj_id); + int i; + char c; + + if (len != 40) + return FALSE; + + for (i = 0; i < len; ++i) { + c = obj_id[i]; + if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f')) + continue; + return FALSE; + } + + return TRUE; +} + char** strsplit_by_space (char *string, int *length) { char *remainder, *s;