summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-01-27 13:29:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:32 -0500
commit7cc28a1c8b701b12ee735f267c194e52e44976df (patch)
tree0b006cea48f6407566f8c2df379552d1b84145ed /source4/lib
parente53f420552ef6b2b3e8b8c231852d185fd0f9642 (diff)
downloadsamba-7cc28a1c8b701b12ee735f267c194e52e44976df.tar.gz
samba-7cc28a1c8b701b12ee735f267c194e52e44976df.tar.bz2
samba-7cc28a1c8b701b12ee735f267c194e52e44976df.zip
r13186: Remove assumption that callers that specify -1 actually mean sizeof(pstring)
(This used to be commit da72f47226f9c514deb75bc6e69548c240822eb5)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/charset/charcnv.c15
1 files changed, 0 insertions, 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)