summaryrefslogtreecommitdiffstats
path: root/openbsd-compat
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/bsd-cygwin_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index 54628e260..9ede21d24 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -194,11 +194,11 @@ _match_pattern(const char *s, const char *pattern)
size_t len;
int ret;
- if ((len = mbstowcs(NULL, s, 0)) < 0)
+ if ((len = mbstowcs(NULL, s, 0)) == (size_t) -1)
return 0;
ws = (wchar_t *) xcalloc(len + 1, sizeof (wchar_t));
mbstowcs(ws, s, len + 1);
- if ((len = mbstowcs(NULL, pattern, 0)) < 0)
+ if ((len = mbstowcs(NULL, pattern, 0)) == (size_t) -1)
return 0;
wpattern = (wchar_t *) xcalloc(len + 1, sizeof (wchar_t));
mbstowcs(wpattern, pattern, len + 1);