When 'scalar unregister' tries to disable maintenance and remove an
enlistment, ensure that the return value is nonzero if either operation
produces *any* nonzero return value, not just when they return a value less
than 0.
Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
{
int res = 0;
- if (toggle_maintenance(0) < 0)
+ if (toggle_maintenance(0))
res = -1;
- if (add_or_remove_enlistment(0) < 0)
+ if (add_or_remove_enlistment(0))
res = -1;
return res;