summaryrefslogtreecommitdiffstats
path: root/source/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-05 12:35:30 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-05 12:35:30 +0000
commit469474803d39ceec7155792d364787318708fb91 (patch)
treeed93d27c1bb05ecab7ceb0b613f2a651327f97a6 /source/lib
parent0a733ce59d3e77f8cfd6a8165beeb39c23b26999 (diff)
downloadsamba-469474803d39ceec7155792d364787318708fb91.tar.gz
samba-469474803d39ceec7155792d364787318708fb91.tar.xz
samba-469474803d39ceec7155792d364787318708fb91.zip
- fixed cast warnings
- ignore *.po32 files
Diffstat (limited to 'source/lib')
-rw-r--r--source/lib/.cvsignore2
-rw-r--r--source/lib/util.c24
2 files changed, 15 insertions, 11 deletions
diff --git a/source/lib/.cvsignore b/source/lib/.cvsignore
index 6d609cec52b..07da2225c72 100644
--- a/source/lib/.cvsignore
+++ b/source/lib/.cvsignore
@@ -1 +1,3 @@
*.po
+*.po32
+
diff --git a/source/lib/util.c b/source/lib/util.c
index d079f869882..c1307336cc1 100644
--- a/source/lib/util.c
+++ b/source/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 */
/****************************************************************************