log: fix bad < 0 check for unsigned