summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
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
commitb79773d3c71182c981af7dbf14b775bb83be52c8 (patch)
tree49c1da4fea31d8bf1a86453fc1cf8da1d235f4ef /source3/lib/util.c
parentc926d8b179643ce26319e5178aaeb38237532fc1 (diff)
downloadsamba-b79773d3c71182c981af7dbf14b775bb83be52c8.tar.gz
samba-b79773d3c71182c981af7dbf14b775bb83be52c8.tar.bz2
samba-b79773d3c71182c981af7dbf14b775bb83be52c8.zip
- fixed cast warnings
- ignore *.po32 files (This used to be commit 469474803d39ceec7155792d364787318708fb91)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c24
1 files changed, 13 insertions, 11 deletions
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 */
/****************************************************************************