- fixed cast warnings
authorAndrew Tridgell <tridge@samba.org>
Mon, 5 Oct 1998 12:35:30 +0000 (12:35 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 5 Oct 1998 12:35:30 +0000 (12:35 +0000)
- ignore *.po32 files

source/lib/.cvsignore
source/lib/util.c

index 6d609cec52bfa8ec66916564302c3273f2d07a98..07da2225c72fe3ca16a0208e1363180b4f085b61 100644 (file)
@@ -1 +1,3 @@
 *.po
+*.po32
+
index d079f86988212c779b6d7221babbc97648353101..c1307336cc18220deecf0b462abf141a8d4d5483 100644 (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 */
 
 /****************************************************************************