mirror of
https://github.com/ChronosX88/netsukuku.git
synced 2024-11-22 18:22:18 +00:00
ntk: Fix incorrect inline statements
* That isn't how you use those.
This commit is contained in:
parent
bc054faf0c
commit
be6e9d3511
@ -31,7 +31,7 @@
|
|||||||
*
|
*
|
||||||
* It returns how many groups there are in the given level.
|
* It returns how many groups there are in the given level.
|
||||||
*/
|
*/
|
||||||
inline int get_groups(int max_levels, int lvl)
|
int get_groups(int max_levels, int lvl)
|
||||||
{
|
{
|
||||||
return lvl == max_levels ? 1 : MAXGROUPNODE;
|
return lvl == max_levels ? 1 : MAXGROUPNODE;
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ struct ext_rnode_cache {
|
|||||||
typedef struct ext_rnode_cache ext_rnode_cache;
|
typedef struct ext_rnode_cache ext_rnode_cache;
|
||||||
|
|
||||||
/* * * Functions' declaration * * */
|
/* * * Functions' declaration * * */
|
||||||
inline int get_groups(int family, int lvl);
|
int get_groups(int family, int lvl);
|
||||||
int is_group_invalid(int *gids, int gid, int lvl, int family);
|
int is_group_invalid(int *gids, int gid, int lvl, int family);
|
||||||
|
|
||||||
int pos_from_gnode(map_gnode *gnode, map_gnode *map);
|
int pos_from_gnode(map_gnode *gnode, map_gnode *map);
|
||||||
|
@ -98,7 +98,7 @@ u_long fnv_32_buf(void *buf, size_t len, u_long hval)
|
|||||||
* first five operations no overflow is possible so we optimized it a
|
* first five operations no overflow is possible so we optimized it a
|
||||||
* bit.
|
* bit.
|
||||||
*/
|
*/
|
||||||
inline unsigned int dl_elf_hash (const unsigned char *name)
|
unsigned int dl_elf_hash (const unsigned char *name)
|
||||||
{
|
{
|
||||||
unsigned long int hash = 0;
|
unsigned long int hash = 0;
|
||||||
if (*name != '\0') {
|
if (*name != '\0') {
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
\*/
|
\*/
|
||||||
u_long fnv_32_buf(void *buf, size_t len, u_long hval);
|
u_long fnv_32_buf(void *buf, size_t len, u_long hval);
|
||||||
unsigned int inthash(unsigned int key);
|
unsigned int inthash(unsigned int key);
|
||||||
inline unsigned int dl_elf_hash (const unsigned char *name);
|
unsigned int dl_elf_hash (const unsigned char *name);
|
||||||
char xor_int(int i);
|
char xor_int(int i);
|
||||||
int hash_time(int *h_sec, int *h_usec);
|
int hash_time(int *h_sec, int *h_usec);
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ void swap_shorts(int nmemb, unsigned short *x, unsigned short *y)
|
|||||||
/*
|
/*
|
||||||
* rand_range: It returns a random number x which is _min <= x <= _max
|
* rand_range: It returns a random number x which is _min <= x <= _max
|
||||||
*/
|
*/
|
||||||
inline int rand_range(int _min, int _max)
|
int rand_range(int _min, int _max)
|
||||||
{
|
{
|
||||||
return (rand()%(_max - _min + 1)) + _min;
|
return (rand()%(_max - _min + 1)) + _min;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user