emacs-devel
[Top][All Lists]
Advanced

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

Re: Suspicious code in search.c


From: Kenichi Handa
Subject: Re: Suspicious code in search.c
Date: Fri, 21 Oct 2005 09:46:32 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

In article <address@hidden>, address@hidden (Kim F. Storm) writes:

> See search.c line 1711-1712:

>         if (ASCII_BYTE_P (*ptr) || ! multibyte)
>           ch = *ptr;
-->       else if (charset_base
-->                && (pat_end - ptr) == 1 || CHAR_HEAD_P (ptr[1]))
>           {
>             unsigned char *charstart = ptr - 1;


> Based on the indentation, I would assume the following interpretation
> is intended:

>         else if (charset_base
>                  && ((pat_end - ptr) == 1 || CHAR_HEAD_P (ptr[1])))
>                     ^                                            ^

Yes, and a compiler should interpret that part as above.
But, I agree that it's better to add that explicit parentheses.

> Can somebody who knows this code better than I take a look (and
> perhaps reformat the code if the current code is ok).

Done.

---
Kenichi Handa
address@hidden




reply via email to

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