From 7cc28a1c8b701b12ee735f267c194e52e44976df Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 27 Jan 2006 13:29:47 +0000 Subject: r13186: Remove assumption that callers that specify -1 actually mean sizeof(pstring) (This used to be commit da72f47226f9c514deb75bc6e69548c240822eb5) --- source4/lib/charset/charcnv.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/source4/lib/charset/charcnv.c b/source4/lib/charset/charcnv.c index e632790155..6f07d78fb1 100644 --- a/source4/lib/charset/charcnv.c +++ b/source4/lib/charset/charcnv.c @@ -22,7 +22,6 @@ */ #include "includes.h" #include "system/iconv.h" -#include "pstring.h" /** * @file @@ -303,10 +302,6 @@ ssize_t push_ascii(void *dest, const char *src, size_t dest_len, int flags) return ret; } - /* treat a pstring as "unlimited" length */ - if (dest_len == (size_t)-1) - dest_len = sizeof(pstring); - src_len = strlen(src); if (flags & (STR_TERMINATE | STR_TERMINATE_ASCII)) @@ -352,9 +347,6 @@ ssize_t pull_ascii(char *dest, const void *src, size_t dest_len, size_t src_len, { size_t ret; - if (dest_len == (size_t)-1) - dest_len = sizeof(pstring); - if (flags & (STR_TERMINATE | STR_TERMINATE_ASCII)) { if (src_len == (size_t)-1) { src_len = strlen(src) + 1; @@ -406,10 +398,6 @@ ssize_t push_ucs2(void *dest, const char *src, size_t dest_len, int flags) return ret; } - /* treat a pstring as "unlimited" length */ - if (dest_len == (size_t)-1) - dest_len = sizeof(pstring); - if (flags & STR_TERMINATE) src_len++; @@ -482,9 +470,6 @@ size_t pull_ucs2(char *dest, const void *src, size_t dest_len, size_t src_len, i { size_t ret; - if (dest_len == (size_t)-1) - dest_len = sizeof(pstring); - if (ucs2_align(NULL, src, flags)) { src = (const void *)((const char *)src + 1); if (src_len > 0) -- cgit