In that case, don't wait to get battery tag.
- Add missing parameter to a DPRINT. - Print pointers using %p instead of %x. - Move all executable code behind a functions initial DPRINT. - Do not use non-trivial initializers. - Check for NULL instead of using !. - Add missing parentheses.