Closed alonbl closed 11 months ago
Hi @RobMeades,
I think this library should be rewritten from scratch with the cleanup pattern.
if (whatever_fail) {
goto cleanup;
}
cleanup:
if (x != NULL) {
release;
}
the nesting and resource management in each branch hides so many bugs... it already took me two days to trace these into the library... two days of mine == ~100 units of ublox... :)
two days of mine == ~100 units of ublox... :)
Surely you're not that cheap ;-). Or are we reassuringly expensive? Anyway, you make a good point, especially when the functions get rather out of hand as that one does.
Thanks again, will test and merge.
per documentation zero should be returned when success while nested uGnssMsgPrivateReceiveStart returns a handle.