Commit f0cc7bda f0cc7bda9699c31f2c478928f78b16876db2fa25 by Sergey Poznyakoff

Bugfixes.

* mailbox/assoc.c (assoc_remove): Fix incorrect copying
between assoc slots.
* mailbox/cfg_parser.y (STRTONUM): Remove useless
dereferencing. Change the loop from `while' to `for'.
1 parent 50da8665
......@@ -173,7 +173,9 @@ assoc_remove (mu_assoc_t assoc, struct _mu_assoc_elem *elem)
}
while ((j < r && r <= i) || (i < j && j < r) || (r <= i && i < j));
*ASSOC_ELEM (assoc, j) = *ASSOC_ELEM (assoc, i);
if (j != i)
memcpy (ASSOC_ELEM (assoc, j), ASSOC_ELEM (assoc, i),
assoc->elsize);
}
return 0;
}
......
......@@ -666,7 +666,7 @@ pop_section (struct scan_tree_data *dat)
{ \
type sum = 0; \
\
while (*s) \
for (; *s; s++) \
{ \
type x; \
\
......@@ -690,7 +690,6 @@ pop_section (struct scan_tree_data *dat)
return 1; \
} \
sum = x; \
*s++; \
} \
res = sum; \
}
......