+2011-05-29 Jim Meyering <meyering@redhat.com>
+
+ trim: remove three superfluous assignments
+ * lib/trim.c (trim2): Remove three superfluous assignments
+ and correct brace positioning.
+
2011-05-29 Bruno Haible <bruno@clisp.org>
wctype-h: Avoid namespace pollution on Solaris 2.6.
for (; mbi_avail (i); mbi_advance (i))
{
if (state == 0 && mb_isspace (mbi_cur (i)))
- {
- state = 0;
- continue;
- }
+ continue;
if (state == 0 && !mb_isspace (mbi_cur (i)))
{
}
if (state == 1 && !mb_isspace (mbi_cur (i)))
- {
- state = 1;
- continue;
- }
+ continue;
if (state == 1 && mb_isspace (mbi_cur (i)))
{
}
else if (state == 2 && mb_isspace (mbi_cur (i)))
{
- state = 2;
+ /* empty */
}
else
{
char *p;
/* Trim leading whitespaces. */
- if (how != TRIM_TRAILING) {
- for (p = d; *p && isspace ((unsigned char) *p); p++)
- ;
+ if (how != TRIM_TRAILING)
+ {
+ for (p = d; *p && isspace ((unsigned char) *p); p++)
+ ;
- memmove (d, p, strlen (p) + 1);
- }
+ memmove (d, p, strlen (p) + 1);
+ }
/* Trim trailing whitespaces. */
- if (how != TRIM_LEADING) {
- for (p = d + strlen (d) - 1; p >= d && isspace ((unsigned char) *p); p--)
- *p = '\0';
- }
+ if (how != TRIM_LEADING)
+ {
+ for (p = d + strlen (d) - 1;
+ p >= d && isspace ((unsigned char) *p); p--)
+ *p = '\0';
+ }
}
return d;