bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-grep] Boyer Moore overflow patch


From: Paul Eggert
Subject: Re: [bug-grep] Boyer Moore overflow patch
Date: Tue, 14 Jun 2005 22:04:09 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Julian Foad <address@hidden> writes:

> +      Moo that's not _that_ easy; you have to avoid an overflow. */

"Moo"?

>        for (i = 0; i < kwset->mind; ++i)
> -     delta[(unsigned char) kwset->target[i]] = kwset->mind - (i + 1);
> +     delta[(unsigned char) kwset->target[i]] =
> +       MIN(kwset->mind - (i + 1), UCHAR_MAX);

There should be a space after the "MIN".  (This is the style
recommended by the GNU coding standards.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]