[pacman-dev] Possible redudant condition in handle.c
Helder Martins
heldermartins89 at gmail.com
Mon Aug 29 16:37:48 EDT 2011
Hi.
I saw this little piece of code in handle.c in libpalm, starts at line 130:
ASSERT(handle->lockfile != NULL, return -1);
-> ASSERT(handle->lckstream != NULL, return 0);
-> if(handle->lckstream != NULL) {
fclose(handle->lckstream);
handle->lckstream = NULL;
}
So i was wondering if that assert or the if condition are redundant, and
if yes which one has the correct behaviour for the objective of this
function.
I can provide the patch once i know which one is the correct behaviour.
Thanks,
Helder Martins
More information about the pacman-dev
mailing list