[git commit master] libbb/xrealloc_vector.c: better comment

Denys Vlasenko vda.linux at googlemail.com
Tue Oct 27 09:01:01 UTC 2009


commit: http://git.busybox.net/busybox/commit/?id=1502a8b4cebe66870d188cda393a620fd48f0f3b
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 libbb/xrealloc_vector.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libbb/xrealloc_vector.c b/libbb/xrealloc_vector.c
index bbd5ab8..98fa967 100644
--- a/libbb/xrealloc_vector.c
+++ b/libbb/xrealloc_vector.c
@@ -20,8 +20,9 @@
  * idx step, plus one: if idx == 0x20, vector[] is resized to 0x31,
  * thus last usable element is vector[0x30].
  *
- * In other words: after xrealloc_vector(v, 4, idx) it's ok to use
- * at least v[idx] and v[idx+1], for all idx values.
+ * In other words: after xrealloc_vector(v, 4, idx), with any idx,
+ * it's ok to use at least v[idx] and v[idx+1].
+ * v[idx+2] etc generally are not ok.
  *
  * New elements are zeroed out, but only if realloc was done
  * (not on every call). You can depend on v[idx] and v[idx+1] being
-- 
1.6.3.3



More information about the busybox-cvs mailing list