Strange code in misc/registry.c