shithub: scc

ref: 352fd1411b9c35e90d824162229a6eb32dd9a7e2
dir: /src/libscc/genhash.c/

View raw version
unsigned
genhash(char *name)
{
	unsigned h;
	char c;

	for (h = 0; c = *name; ++name)
		h = h*33 ^ c;

	return h;
}