Sorry Zhijian, I missed this email. On Wed, Oct 04, 2023 at 06:32:14PM +0200, Juan Quintela wrote: > > * Avoid non-negative integer error values.
Perhaps we need to forbid that if doing this. I can see Zhijian's point, where "if (ret)" can also capture unexpected positive returns, while "if (ret < 0)" is not clear on who's handling ret>0 case. Personally I like that, too. > 3 - I fully agree that code is more maintenable this way. I.e. if any > function changes to return positive values for non error, we get > better coverage. This patch does at least try to unify error handling, though.. $ git grep "ret < 0" migration/rdma.c | wc -l 36 So we have half doing this and half doing that, makes sense to do the same. Let's assume no vote from my side due to pros and cons, so it's 2:1. :) Thanks, -- Peter Xu