pub unsafe fn chash_get(
    mut hash: *mut chash,
    mut key: *mut chashdatum,
    mut result: *mut chashdatum,
) -> libc::c_int {
    let mut func: libc::c_uint = 0;
    let mut iter: *mut chashiter = 0 as *mut chashiter;
    func = chash_func((*key).data as *const libc::c_char, (*key).len);
    iter = *(*hash)
        .cells
        .offset(func.wrapping_rem((*hash).size) as isize);
    while !iter.is_null() {
        if (*iter).key.len == (*key).len
            && (*iter).func == func
            && 0 == memcmp((*iter).key.data, (*key).data, (*key).len as libc::size_t)
        {
            *result = (*iter).value;
            return 0i32;
        }
        iter = (*iter).next
    }
    return -1i32;
}
/* Retrieves the data associated to the key if it is found in the hash table.
The data pointer and the length will be NULL if not found*/
Retrieves the data associated to the key if it is found in the hash table.
The data pointer and the length will be NULL if not found
Retrieves the data associated to the key if it is found in the hash table . The data pointer and the length will be NULL if not found
pub unsafe fn chash_get(
    mut hash: *mut chash,
    mut key: *mut chashdatum,
    mut result: *mut chashdatum,
) -> libc::c_int {
    let mut func: libc::c_uint = 0;
    let mut iter: *mut chashiter = 0 as *mut chashiter;
    func = chash_func((*key).data as *const libc::c_char, (*key).len);
    iter = *(*hash)
        .cells
        .offset(func.wrapping_rem((*hash).size) as isize);
    while !iter.is_null() {
        if (*iter).key.len == (*key).len
            && (*iter).func == func
            && 0 == memcmp((*iter).key.data, (*key).data, (*key).len as libc::size_t)
        {
            *result = (*iter).value;
            return 0i32;
        }
        iter = (*iter).next
    }
    return -1i32;
}
pub unsafe fn chash_get ( mut hash : * mut chash , mut key : * mut chashdatum , mut result : * mut chashdatum , ) -> libc :: c_int { let mut func : libc :: c_uint = 0 ; let mut iter : * mut chashiter = 0 as * mut chashiter ; func = chash_func ( ( * key ) . data as * const libc :: c_char , ( * key ) . len ) ; iter = * ( * hash ) . cells . offset ( func . wrapping_rem ( ( * hash ) . size ) as isize ) ; while ! iter . is_null ( ) { if ( * iter ) . key . len == ( * key ) . len && ( * iter ) . func == func && 0 == memcmp ( ( * iter ) . key . data , ( * key ) . data , ( * key ) . len as libc :: size_t ) { * result = ( * iter ) . value ; return 0i32 ; } iter = ( * iter ) . next } return - 1i32 ; }
Retrieves the data associated to the key if it is found in the hash table.
Retrieves the data associated to the key if it is found in the hash table .
hash
*mut chash
key
*mut chashdatum
result
*mut chashdatum
hash
*mut chash
key
*mut chashdatum
result
*mut chashdatum