If the library didn't open, LibBase would be NULL, which is zero, which is FALSE. If the library did open, it wouldn't be zero, which is TRUE. This all stems from the fact that C isn't type strict and doesn't have a boolean type. A more logical way to do the same thing would be to use:
if(LibBase != NULL)
Any compiler worth its salt will optimise this so that it's no less efficient than the first version.