Don't complain when finding no tether stats.

TetherController::addForwardChainStats returns an error if it
doesn't find any tethering stats. This was fine when we were
still using CommandListener, which would not attempt to fetch
the stats if tethering was not enabled.

Instead of returning an error when no stats are found, return
an error only if the output was empty (implying that no headers
were found and thus the required rules do not exist). If the
output contains headers but no stats, don't return an error.

Returning an error was a necessity in the previous code because
it had no unit or integration tests, but such measures are not
necessary now that we have test coverage.

Fix: 65550883
Bug: 65369386
Test: bullhead builds, boots
Test: netd_{unit,integration}_test pass
Change-Id: Ie32f4d941dd52c8dc9ff09fde26cc97cedf96bc3
diff --git a/server/TetherController.cpp b/server/TetherController.cpp
index 13cf1d8..baf477a 100644
--- a/server/TetherController.cpp
+++ b/server/TetherController.cpp
@@ -645,7 +645,6 @@
     const TetherStats empty;
     const char *buffPtr;
     int64_t packets, bytes;
-    int statsFound = 0;
 
     std::stringstream stream(statsOutput);
 
@@ -702,13 +701,12 @@
         if (stats.rxBytes != -1 && stats.txBytes != -1) {
             ALOGV("rx_bytes=%" PRId64" tx_bytes=%" PRId64, stats.rxBytes, stats.txBytes);
             addStats(statsList, stats);
-            statsFound++;
             stats = empty;
         }
     }
 
     /* It is always an error to find only one side of the stats. */
-    if (((stats.rxBytes == -1) != (stats.txBytes == -1)) || !statsFound) {
+    if (((stats.rxBytes == -1) != (stats.txBytes == -1))) {
         return -EREMOTEIO;
     }
     return 0;