The first commit fixes a bug in cleanpath.c where ".." path entries are not properly detected and, therefore, not collapsed. I suspect the paths continue to be usable by the program even if they are not ideal which explains why it has not been detected previously.
The second commit adds proper checks for NULL and '\0', replacing code that simply checks or assume these values are zero. This is hygiene and not any change in functionality. I made the edits simply because I was there, reviewing the code.
The first commit fixes a bug in cleanpath.c where ".." path entries are not properly detected and, therefore, not collapsed. I suspect the paths continue to be usable by the program even if they are not ideal which explains why it has not been detected previously.
The second commit adds proper checks for NULL and '\0', replacing code that simply checks or assume these values are zero. This is hygiene and not any change in functionality. I made the edits simply because I was there, reviewing the code.