Asterisk - The Open Source Telephony Project  18.5.0
Functions
hash_log2.c File Reference
#include <sys/types.h>
#include "../include/db.h"
Include dependency graph for hash_log2.c:

Go to the source code of this file.

Functions

u_int32_t __hash_log2 (u_int32_t num)
 
u_int32_t __hash_log2 __P ((u_int32_t))
 

Function Documentation

◆ __hash_log2()

u_int32_t __hash_log2 ( u_int32_t  num)

Definition at line 48 of file hash_log2.c.

Referenced by __expand_table(), init_hash(), and init_htab().

50 {
51  register u_int32_t i, limit;
52 
53  limit = 1;
54  for (i = 0; limit < num; limit = limit << 1, i++);
55  return (i);
56 }
unsigned int u_int32_t

◆ __P()