mailing list of musl libc
 help / color / mirror / code / Atom feed
9e1cf98f5c51140d81108189bceaab73a6c9756d blob 298 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 
#include <search.h>
#include "tsearch.h"

void *tfind(const void *key, void *const *rootp,
	int(*cmp)(const void *, const void *))
{
	if (!rootp)
		return 0;

	struct node *n = *rootp;
	for (;;) {
		if (!n)
			break;
		int c = cmp(key, n->key);
		if (!c)
			break;
		n = n->a[c>0];
	}
	return n;
}
debug log:

solving 9e1cf98f ...
found 9e1cf98f in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).