From: Tobias Brunner Date: Wed, 3 Mar 2010 16:34:06 +0000 (+0100) Subject: The return value of snprintf is int not size_t. X-Git-Tag: 4.4.0~254 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc1afcc89e142f9c77c0e0da767c0e09dc33628d;p=thirdparty%2Fstrongswan.git The return value of snprintf is int not size_t. --- diff --git a/src/libstrongswan/utils.c b/src/libstrongswan/utils.c index 8ee5769954..b1b860351f 100644 --- a/src/libstrongswan/utils.c +++ b/src/libstrongswan/utils.c @@ -121,7 +121,7 @@ void *memstr(const void *haystack, const char *needle, size_t n) */ bool mkdir_p(const char *path, mode_t mode) { - size_t len; + int len; char *pos, full[PATH_MAX]; pos = full; if (!path || *path == '\0') diff --git a/src/libstrongswan/utils/enumerator.c b/src/libstrongswan/utils/enumerator.c index 7efdd883e2..b010f5b92c 100644 --- a/src/libstrongswan/utils/enumerator.c +++ b/src/libstrongswan/utils/enumerator.c @@ -76,7 +76,8 @@ static bool enumerate_dir_enum(dir_enum_t *this, char **relative, char **absolute, struct stat *st) { struct dirent *entry = readdir(this->dir); - size_t len, remaining; + size_t remaining; + int len; if (!entry) { @@ -120,7 +121,7 @@ static bool enumerate_dir_enum(dir_enum_t *this, char **relative, */ enumerator_t* enumerator_create_directory(char *path) { - size_t len; + int len; dir_enum_t *this = malloc_thing(dir_enum_t); this->public.enumerate = (void*)enumerate_dir_enum; this->public.destroy = (void*)destroy_dir_enum;