From 1b1908b35daee0a08542e085fcf72524d18cc30c Mon Sep 17 00:00:00 2001 From: prife Date: Wed, 20 May 2015 20:37:40 +0800 Subject: [PATCH] [kservice] fix rt_strcmp/strncmp/strlen prototype --- include/rtthread.h | 6 +++--- src/kservice.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/rtthread.h b/include/rtthread.h index 5309c31d5a..9bb02abede 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -501,9 +501,9 @@ int *_rt_errno(void); void *rt_memset(void *src, int c, rt_ubase_t n); void *rt_memcpy(void *dest, const void *src, rt_ubase_t n); -rt_ubase_t rt_strncmp(const char *cs, const char *ct, rt_ubase_t count); -rt_ubase_t rt_strcmp (const char *cs, const char *ct); -rt_ubase_t rt_strlen (const char *src); +rt_int32_t rt_strncmp(const char *cs, const char *ct, rt_ubase_t count); +rt_int32_t rt_strcmp (const char *cs, const char *ct); +rt_size_t rt_strlen (const char *src); char *rt_strdup(const char *s); char *rt_strstr(const char *str1, const char *str2); diff --git a/src/kservice.c b/src/kservice.c index b5dc92b091..ab15917bbe 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -430,7 +430,7 @@ RTM_EXPORT(rt_strncpy); * * @return the result */ -rt_ubase_t rt_strncmp(const char *cs, const char *ct, rt_ubase_t count) +rt_int32_t rt_strncmp(const char *cs, const char *ct, rt_ubase_t count) { register signed char __res = 0; @@ -453,7 +453,7 @@ RTM_EXPORT(rt_strncmp); * * @return the result */ -rt_ubase_t rt_strcmp(const char *cs, const char *ct) +rt_int32_t rt_strcmp(const char *cs, const char *ct) { while (*cs && *cs == *ct) cs++, ct++; @@ -470,7 +470,7 @@ RTM_EXPORT(rt_strcmp); * * @return the length of string */ -rt_ubase_t rt_strlen(const char *s) +rt_size_t rt_strlen(const char *s) { const char *sc;