diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-10-05 12:35:30 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-10-05 12:35:30 +0000 |
commit | b79773d3c71182c981af7dbf14b775bb83be52c8 (patch) | |
tree | 49c1da4fea31d8bf1a86453fc1cf8da1d235f4ef /source3/lib | |
parent | c926d8b179643ce26319e5178aaeb38237532fc1 (diff) | |
download | samba-b79773d3c71182c981af7dbf14b775bb83be52c8.tar.gz samba-b79773d3c71182c981af7dbf14b775bb83be52c8.tar.xz samba-b79773d3c71182c981af7dbf14b775bb83be52c8.zip |
- fixed cast warnings
- ignore *.po32 files
(This used to be commit 469474803d39ceec7155792d364787318708fb91)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/.cvsignore | 2 | ||||
-rw-r--r-- | source3/lib/util.c | 24 |
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 */ /**************************************************************************** |