Re: Pointer corruption errors...



On Wed, Jan 10, 2001 at 11:10:58PM +0000, Jonathan Irwin wrote:
Well, what you have there seems to be OK, I might add that returning 1
isn't a good idea (1 is a valid pointer, I think, correct me if I'm 
wrong), but I suspect that you are doing it for testing.  I can't see any
other problems, although I've never done any playing with the internals of
the dirent structure so I can't really check that.  What is that line
supposed to be doing?  Using the while loop and readdir() will step
through all the entries in the directory anyway.

Yeah, I just stuck return 1 in there just as something for the loop to do if it got there. The dirent line 
was a remnant from getdents usage. I forgot that the readdir loop will iterate through all of the entries.
 
What does the rest of the program do?  Have you tested this function on
it's own?  If so, I'm out of ideas.


The rest of the program at this point is just the interface code output by glade. I just tested the program 
by itself (renamed recurse_dir to main, changed some minor things) and it still has corruption problems. I'm 
make'ing world right now as well, in hopes that something was fixed in the system that may have been causing 
it.

Thanks for your help
Craig




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]