]> arthur.barton.de Git - netatalk.git/commitdiff
Some cleanup
authorFrank Lahm <franklahm@googlemail.com>
Thu, 12 May 2011 12:12:37 +0000 (14:12 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Thu, 12 May 2011 12:12:37 +0000 (14:12 +0200)
etc/afpd/ofork.c

index e65c4024f530077f8db5cd3416735c81bcdc21fc..ec0c6e2876e52a5990d4f8f8cb8ff6f8ed6e88d1 100644 (file)
 #include "directory.h"
 #include "fork.h"
 
-/* we need to have a hashed list of oforks (by dev inode). just hash
- * by first letter. */
+/* we need to have a hashed list of oforks (by dev inode) */
 #define OFORK_HASHSIZE  64
-static struct ofork     *ofork_table[OFORK_HASHSIZE];
-
-static struct ofork **oforks = NULL;
+static struct ofork *ofork_table[OFORK_HASHSIZE]; /* forks hashed by dev/inode */
+static struct ofork **oforks = NULL;              /* point to allocated table of open forks pointers */
 static int          nforks = 0;
 static u_short      lastrefnum = 0;
 
@@ -40,12 +38,6 @@ static u_short      lastrefnum = 0;
 /* OR some of each character for the hash*/
 static unsigned long hashfn(const struct file_key *key)
 {
-#if 0
-    unsigned long i = 0;
-    while (*name) {
-        i = ((i << 4) | (8*sizeof(i) - 4)) ^ *name++;
-    }
-#endif
     return key->inode & (OFORK_HASHSIZE - 1);
 }