simukis/e4rat-preload-lite — pull request #1 by MichalPokorny (2012-09-29 23:41:19+00:00)
Title: Some small changes

Hi, I took a look at your source and found a few places I thought I could improve.

- I added an explicit strlen declaration. It used to spew out a compiler warning.
- I added some comments into the source file.
- I added a die(const char*) function and changed error handling to use it. I also added a few checks for unlikely errors.
- The FileDesc structures stored the index of the file, but we always know the index when we need to access one. I removed it.
- load_inodes looped over all the files, not only over the ones it should preload. Also it looped not over the sorted array of files, but over the unsorted one. I assume this to be a mistake, sorry if I'm wrong about this.
- I changed 0s to NULLs when used as pointers.