Fix two warnings from Clang's static analyzer.
Remove an unused variable.
Make LocalDiscovery work for SPTPS packets.