diff --git a/output.c b/output.c
index ac8c9d0..db6e93e 100644
--- a/output.c
+++ b/output.c
@@ -22,9 +22,10 @@ static int current_depth = 0;
static int current_column = 0;
static void
-output_indent(Process *proc) {
- current_column +=
- fprintf(options.output, "%*s", options.indent * proc->callstack_depth, "");
+output_indent(struct Process *proc)
+{
+ int d = options.indent * (proc->callstack_depth - 1);
+ current_column += fprintf(options.output, "%*s", d, "");
}
static void
diff --git a/proc.c b/proc.c
index 51833fe..54afbe0 100644
--- a/proc.c
+++ b/proc.c
@@ -49,6 +49,7 @@ arch_dynlink_done(struct Process *proc)
#endif
static void add_process(struct Process *proc, int was_exec);
+static void unlist_process(struct Process *proc);
static int
process_bare_init(struct Process *proc, const char *filename,
@@ -96,7 +97,7 @@ process_bare_destroy(struct Process *proc, int was_exec)
dict_clear(proc->breakpoints);
if (!was_exec) {
free(proc->filename);
- remove_process(proc);
+ unlist_process(proc);
}
}