Originally Posted by
Salem
So where exactly did you post any evidence that you saw an "after malloc" and then a segfault?
really you are still arguing with me about this? really?
it is all within the first three post, post 1, everything, post 2 the accusation that actually came from you,
Originally Posted by
Salem
> printf("after malloc %s %s\n", path,*names);
You only just allocated names, and now you're trying to dereference it.
post 3 me clarifying it to you
Originally Posted by
poorboy
all of them printf's came after it already was blowing up (seg faulting). .....
AFTER it was seg faulting, key word after the fact .that you and others keep insisting was and is the cause of it seg faulting, when if you go back and look at my code I posed it its entirety, it is hiding up in listdir the same type of printf. that was there BEFORE the fact, that I did not catch. you and others got caught up in what you said was the cause of it, even after I clearly pointed out that there is no way that that printf you say is causing it could be the cause of it and the reason why. yet you still are insisting that it is. even after I pointed that fact out.
who is not really paying attention to details here?
call in main
Code:
> printf("after malloc %s %s\n", path,*names);
You only just allocated names, and now you're trying to dereference it.
placed in there after it was seg faulting then pointing that fact out to you when you pointed to it being the reason.
call in listdir
Code:
char ** listdir(const char *name, char *names, int indent)
{printf("listdir %s, %s, %d\n", name,*names,indent);
that was there prior to me placing the printf's in main. that was coming up NULL after malloc took place. because it was still empty.