karthik nayak [off-list ref] writes:
quoted
+ } else {
+ int checkret;
+ checkret = check_old_oid(update, &lock->old_oid, err);
+ if (checkret) {
+ ret = checkret;
+ goto out;
+ }
Can't we simply do:
ret = check_old_oid(update, &lock->old_oid, err);
if (ret) {
goto out
}
if ret is '0', it shouldn't matter no?
That's nice. Yes, as long as "ret" has no useful information when
we enter this "else" block, reusing it like you did is just fine.
This is one of these moments I tell myself "oh, why didn't *I* think
of that" ;-).
Thanks.