コード例 #1
0
ファイル: error.c プロジェクト: DavidMulder/heimdal
static int
error_cmp(void *a, void *b)
{
    struct heim_error *ap = a, *bp = b;
    if (ap->error_code == bp->error_code)
	return 0;
    return heim_cmp(ap->msg, bp->msg);
}
コード例 #2
0
ファイル: dict.c プロジェクト: Henauxg/minix
static struct hashentry *
_search(heim_dict_t dict, heim_object_t ptr)
{
    unsigned long v = heim_get_hash(ptr);
    struct hashentry *p;

    for (p = dict->tab[v % dict->size]; p != NULL; p = p->next)
	if (heim_cmp(ptr, p->key) == 0)
	    return p;

    return NULL;
}