From: Volker Lendecke Date: Fri, 4 May 2018 20:28:43 +0000 (+0200) Subject: lib: Fix prototype of srprs_str X-Git-Tag: ldb-1.5.0~214 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7daf5e627690350f19482cf0b72b070a09fd4235;p=thirdparty%2Fsamba.git lib: Fix prototype of srprs_str Many callers use "-1" as the "len" argument. That's what ssize_t is for. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/srprs.c b/source3/lib/srprs.c index 80dbc96c854..02f4c80e27b 100644 --- a/source3/lib/srprs.c +++ b/source3/lib/srprs.c @@ -44,7 +44,7 @@ bool srprs_char(const char** ptr, char c) { return false; } -bool srprs_str(const char** ptr, const char* str, size_t len) +bool srprs_str(const char** ptr, const char* str, ssize_t len) { if (len == -1) len = strlen(str); diff --git a/source3/lib/srprs.h b/source3/lib/srprs.h index c1aec13e4af..1b3d355c1fb 100644 --- a/source3/lib/srprs.h +++ b/source3/lib/srprs.h @@ -65,7 +65,7 @@ bool srprs_char(const char** ptr, char c); * * @return true if matched */ -bool srprs_str(const char** ptr, const char* str, size_t len); +bool srprs_str(const char** ptr, const char* str, ssize_t len); /** * Match a single character from a set.