[Tux3] the first dleaf_chop in dleaf.c:main() crashes

Benjamin K. Stuhl benjamin.stuhl at colorado.edu
Tue Sep 9 13:35:07 PDT 2008


On Tue, September 9, 2008 14:26, Daniel Phillips wrote:
> Sorry, that was no good, how about:
>
> diff -r ef31d85601b7 user/test/dleaf.c
> --- a/user/test/dleaf.c	Tue Sep 09 12:02:44 2008 -0700
> +++ b/user/test/dleaf.c	Tue Sep 09 13:26:41 2008 -0700
> @@ -167,6 +167,9 @@ int dleaf_chop(BTREE, tuxkey_t high, vle
>  	struct entry *estop = entry - group->count;
>  	unsigned extents = 0, start = 0, trunc = 0;
>  	unsigned newgroups = leaf->groups;
> +
> +	if (!newgroups)
> +		return 0;
>
>  	while (1) {
>  		unsigned count = entry->limit - start;
>

Yup, that works!

Thanks,
-- BKS

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list