Back to index

glibc  2.9
Defines | Functions
nis_hash.c File Reference
#include <rpcsvc/nis.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define HASHC   h = *key++ + 65599 * h

Functions

uint32_t __nis_hash (const void *keyarg, register size_t len)

Define Documentation

#define HASHC   h = *key++ + 65599 * h

Function Documentation

uint32_t __nis_hash ( const void *  keyarg,
register size_t  len 
)

Definition at line 33 of file nis_hash.c.

{
  register const u_char *key;
  register size_t loop;
  register uint32_t h;

#define HASHC   h = *key++ + 65599 * h

  h = 0;
  key = keyarg;
  if (len > 0)
    {
      loop = (len + 8 - 1) >> 3;
      switch (len & (8 - 1))
       {
       case 0:
         do {
           HASHC;
           /* FALLTHROUGH */
         case 7:
           HASHC;
           /* FALLTHROUGH */
         case 6:
           HASHC;
           /* FALLTHROUGH */
         case 5:
           HASHC;
           /* FALLTHROUGH */
         case 4:
           HASHC;
           /* FALLTHROUGH */
         case 3:
           HASHC;
           /* FALLTHROUGH */
         case 2:
           HASHC;
           /* FALLTHROUGH */
         case 1:
           HASHC;
         } while (--loop);
       }
    }
  return h;
}

Here is the caller graph for this function: