29 Aug
2011
29 Aug
'11
8:43 p.m.
On Mon, Aug 29, 2011 at 3:37 PM, Helder Martins <heldermartins89@gmail.com> wrote:
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.
Good catch. Looks like when I refactored this stuff I added the assert without removing the now redundant conditional- you should be able to kill the if check here completely. -Dan