svn commit: samba r13186 - in
branches/SAMBA_4_0/source/lib/charset: .
jelmer at samba.org
jelmer at samba.org
Fri Jan 27 13:29:50 GMT 2006
Author: jelmer
Date: 2006-01-27 13:29:47 +0000 (Fri, 27 Jan 2006)
New Revision: 13186
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13186
Log:
Remove assumption that callers that specify -1 actually mean sizeof(pstring)
Modified:
branches/SAMBA_4_0/source/lib/charset/charcnv.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/charset/charcnv.c
===================================================================
--- branches/SAMBA_4_0/source/lib/charset/charcnv.c 2006-01-27 13:27:13 UTC (rev 13185)
+++ branches/SAMBA_4_0/source/lib/charset/charcnv.c 2006-01-27 13:29:47 UTC (rev 13186)
@@ -22,7 +22,6 @@
*/
#include "includes.h"
#include "system/iconv.h"
-#include "pstring.h"
/**
* @file
@@ -303,10 +302,6 @@
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 @@
{
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 @@
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 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)
More information about the samba-cvs
mailing list