----------------
Continue to the previous, for some system calls, such as opening files, I often see that many programmers do not do any judgment on FOPEN, they are directly used. Then find that the content of the file is not read, or you can't write it. Still judge:
FP = fopen ("log.txt", "a");
IF (fp == NULL) {
Printf ("Error: Open File Error / N");
Return False;
}
There are still many other, such as: Socket number returned by Socket, Malloc returned by Mall. Please judge what these system calls returned.