summaryrefslogtreecommitdiff
path: root/source3/lib/util_unistr.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-05-31 13:46:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:02 -0500
commitf24d88cf9da46680d52b42b92bd484e7b09ce99b (patch)
treeb30342fd7677a0d17306130077995110bfae344a /source3/lib/util_unistr.c
parent450e8d5749504f8392c0cfe8b79218f03b88076a (diff)
downloadsamba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.tar.gz
samba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.tar.bz2
samba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.zip
r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1
(This used to be commit 9727d05241574042dd3aa8844ae5c701d22e2da1)
Diffstat (limited to 'source3/lib/util_unistr.c')
-rw-r--r--source3/lib/util_unistr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index 89639423bb..678eb22d2c 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -382,10 +382,10 @@ size_t strnlen_w(const smb_ucs2_t *src, size_t max)
smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c)
{
while (*s != 0) {
- if (c == *s) return CONST_DISCARD(smb_ucs2_t *, s);
+ if (c == *s) return (smb_ucs2_t *)s;
s++;
}
- if (c == *s) return CONST_DISCARD(smb_ucs2_t *, s);
+ if (c == *s) return (smb_ucs2_t *)s;
return NULL;
}
@@ -406,7 +406,7 @@ smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c)
if (len == 0) return NULL;
p += (len - 1);
do {
- if (c == *p) return CONST_DISCARD(smb_ucs2_t *, p);
+ if (c == *p) return (smb_ucs2_t *)p;
} while (p-- != s);
return NULL;
}
@@ -427,7 +427,7 @@ smb_ucs2_t *strnrchr_w(const smb_ucs2_t *s, smb_ucs2_t c, unsigned int n)
n--;
if (!n)
- return CONST_DISCARD(smb_ucs2_t *, p);
+ return (smb_ucs2_t *)p;
} while (p-- != s);
return NULL;
}
@@ -445,7 +445,7 @@ smb_ucs2_t *strstr_w(const smb_ucs2_t *s, const smb_ucs2_t *ins)
return NULL;
inslen = strlen_w(ins);
- r = CONST_DISCARD(smb_ucs2_t *, s);
+ r = (smb_ucs2_t *)s;
while ((r = strchr_w(r, *ins))) {
if (strncmp_w(r, ins, inslen) == 0)
@@ -716,7 +716,7 @@ smb_ucs2_t *strpbrk_wa(const smb_ucs2_t *s, const char *p)
int i;
for (i=0; p[i] && *s != UCS2_CHAR(p[i]); i++)
;
- if (p[i]) return CONST_DISCARD(smb_ucs2_t *, s);
+ if (p[i]) return (smb_ucs2_t *)s;
s++;
}
return NULL;
@@ -731,7 +731,7 @@ smb_ucs2_t *strstr_wa(const smb_ucs2_t *s, const char *ins)
return NULL;
inslen = strlen(ins);
- r = CONST_DISCARD(smb_ucs2_t *, s);
+ r = (smb_ucs2_t *)s;
while ((r = strchr_w(r, UCS2_CHAR(*ins)))) {
if (strncmp_wa(r, ins, inslen) == 0)