Fix bug: Init auto var to unrandomize `stack_depth' rv.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Sat, 9 Jan 2010 10:01:42 +0000 (11:01 +0100)
committerAndy Wingo <wingo@pobox.com>
Sat, 9 Jan 2010 22:26:22 +0000 (23:26 +0100)
* libguile/stacks.c (stack_depth): Init `n'.

Signed-off-by: Thien-Thi Nguyen <ttn@gnuvola.org>
libguile/stacks.c

index 61b7be3..ce16063 100644 (file)
@@ -66,7 +66,7 @@ static SCM stack_id_with_fp (SCM frame, SCM **fp);
 static long
 stack_depth (SCM frame, SCM *fp)
 {
-  long n;
+  long n = 0;
   /* count frames, skipping boot frames */
   for (; scm_is_true (frame) && SCM_VM_FRAME_FP (frame) > fp;
        frame = scm_frame_previous (frame))