bug-readline
[Top][All Lists]
Advanced

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

[Bug-readline] Missing semicolon in _rl_strnicmp in util.c


From: Laurent Moss
Subject: [Bug-readline] Missing semicolon in _rl_strnicmp in util.c
Date: Sun, 4 Aug 2013 15:36:39 -0400

Hi all,

There seems to be a missing semicolon after a do { ... } while (...) in the definition of _rl_strnicmp in util.c. This caused a compile error during a Canadian cross build.

Here is the relevant snippet from http://git.savannah.gnu.org/cgit/readline.git/tree/util.c:

===
#if !defined (HAVE_STRCASECMP)
/* Compare at most COUNT characters from string1 to string2.  Case
   doesn't matter (strncasecmp). */
int
_rl_strnicmp (string1, string2, count)
     char *string1, *string2;
     int count;
{
  /* snip */
  do
    {
      d = _rl_to_lower (*s1) - _rl_to_lower (*s2); /* XXX - cast to unsigned char? */
      if (d != 0)
return d;
      if (*s1++ == '\0')
        break;
      s2++;
    }
  while (--count != 0) <---- missing semicolon here

  return (0);
}
/* snip */
#endif /* !HAVE_STRCASECMP */
===

Regards,

Laurent

reply via email to

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