cmds/service: Fix categoryCount
By introducing a new 'categoryCount' in an inner scope, and only
incrementing it within this inner scope, we're assured that when
we leave this scope, our "if (categoryCount > 0)" will always
be false, not matter how 'categories' we added.
This almost certainly is not the intention of this code, so we
removing the inner scope declaration of the variable, so that
'categoryCount' will be updated.
Bug: 28288587
Test: TreeHugger
Change-Id: Ie592a02c5baa1eb5527ddd8d726e3b1181d937fd
1 file changed