-# $OpenBSD: Makefile,v 1.1 2024/09/01 00:22:59 aisha Exp $
+# $OpenBSD: Makefile,v 1.2 2024/09/01 06:05:11 anton Exp $
CFLAGS= -I${BSDSRCDIR}/sys/dev/pci/drm/include
PROGS= rb-linux
+WARNINGS=yes
.include <bsd.regress.mk>
-/* $OpenBSD: rb-linux.c,v 1.1 2024/09/01 00:22:59 aisha Exp $ */
+/* $OpenBSD: rb-linux.c,v 1.2 2024/09/01 06:05:11 anton Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
struct rb_root root;
-struct keynode *
+static struct keynode *
rb_find(struct rb_root *head, struct keynode *elm)
{
struct rb_node *tmp = head->rb_node;
return NULL;
}
-struct keynode *
+static struct keynode *
rb_insert(struct rb_root *head, struct keynode *elm)
{
struct rb_node **tmp;
for (t = 0; t < 10; t++) {
for (i = 0; i < ITER; i++) {
tmp = malloc(sizeof(struct keynode));
- if (tmp == NULL) err(1, "malloc");
+ if (tmp == NULL)
+ err(1, "malloc");
do {
- tmp->key = arc4random_uniform(MAX-MIN);
+ tmp->key = arc4random_uniform(MAX - MIN);
tmp->key += MIN;
} while (rb_find(&root, tmp) != NULL);
if (i == 0)