Remove unused `pending` variable

It was only ever set to 0 so it is completely redundant.