summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/.cvsignore2
-rw-r--r--source3/lib/util.c24
2 files changed, 15 insertions, 11 deletions
diff --git a/source3/lib/.cvsignore b/source3/lib/.cvsignore
index 6d609cec52..07da2225c7 100644
--- a/source3/lib/.cvsignore
+++ b/source3/lib/.cvsignore
@@ -1 +1,3 @@
*.po
+*.po32
+
diff --git a/source3/lib/util.c b/source3/lib/util.c
index d079f86988..c1307336cc 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2334,21 +2334,23 @@ int name_extract(char *buf,int ofs,char *name)
/****************************************************************************
return the total storage length of a mangled name
****************************************************************************/
-int name_len(unsigned char *s)
+int name_len(char *s1)
{
- int len;
+ /* NOTE: this argument _must_ be unsigned */
+ unsigned char *s = (unsigned char *)s1;
+ int len;
- /* If the two high bits of the byte are set, return 2. */
- if (0xC0 == (*s & 0xC0))
- return(2);
+ /* If the two high bits of the byte are set, return 2. */
+ if (0xC0 == (*s & 0xC0))
+ return(2);
- /* Add up the length bytes. */
- for (len = 1; (*s); s += (*s) + 1) {
- len += *s + 1;
- SMB_ASSERT(len < 80);
- }
+ /* Add up the length bytes. */
+ for (len = 1; (*s); s += (*s) + 1) {
+ len += *s + 1;
+ SMB_ASSERT(len < 80);
+ }
- return(len);
+ return(len);
} /* name_len */
/****************************************************************************