> >> >> out: > >> >> reloc_cache_reset(&eb->reloc_cache, eb); > >> >> - return remain; > >> >> + return ret; > >> > > >> > now, this function is also returning a different value, not the > >> > remaining bytes anymore but 0 on success and -error on failure. > >> > Is this something you wanted? > >> Function still returning the same value as before, but now we > >> don't reuse variable. Regardless, the caller treats any return > >> value the same. Still, the return value is either 0, an error, > >> or an offset, just like before. > > > > Even when this is true: > Yep, the funny part is that you have an unsigned value for offset, > but it's cast to signed to check for errors and return, there was > no actual offset in that variable, just an error code,and I didn’t > really modify it, just used the 'ret' variable.
oh, yes, yes, sorry, I completely misread it (or actually distractedly read it). You are right here. Besides all functions using this are indeed using it as success/error and this would have been my next question :-) Andi