Fix a number of clang-tidy warnings

No functional changes. There are still plenty of atoi() warnings,
but most of those should go away as we convert all remaining
commands to binder.

Test: atest netd_integration_test netd_utils_test netd_integration_test
Change-Id: I15d6fd9523debf996dec9d0b3c3d7c11ae6444f3
diff --git a/server/ndc.cpp b/server/ndc.cpp
index 836e802..ec59637 100644
--- a/server/ndc.cpp
+++ b/server/ndc.cpp
@@ -156,12 +156,10 @@
 
         for (i = 0; i < rc; i++) {
             if (buffer[i] == '\0') {
-                int code;
                 char tmp[4];
-
                 strncpy(tmp, buffer + offset, 3);
                 tmp[3] = '\0';
-                code = atoi(tmp);
+                long code = strtol(tmp, nullptr, 10);
 
                 printf("%s\n", buffer + offset);
                 if (stop_after_cmd) {