1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

- fixed cast warnings

- ignore *.po32 files
This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 0a733ce59d
commit 469474803d
2 changed files with 15 additions and 11 deletions

View File

@ -1 +1,3 @@
*.po
*.po32

View File

@ -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 */
/****************************************************************************