[adb] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: Ia8c4deacafed2f3b7dbc3d4c3c77c6c632e3de81
diff --git a/adb/client/commandline.cpp b/adb/client/commandline.cpp
index e07dba7..80d0dd3 100644
--- a/adb/client/commandline.cpp
+++ b/adb/client/commandline.cpp
@@ -885,7 +885,7 @@
return 0;
}
- int block = strtol(buf, NULL, 10);
+ int block = strtol(buf, nullptr, 10);
size_t offset = block * SIDELOAD_HOST_BLOCK_SIZE;
if (offset >= static_cast<size_t>(sb.st_size)) {
@@ -968,7 +968,7 @@
//argv[2] and beyond become ppp_args[1] and beyond
ppp_args[i - 1] = argv[i];
}
- ppp_args[i-1] = NULL;
+ ppp_args[i-1] = nullptr;
// child side
@@ -1174,7 +1174,7 @@
argv[i++] = argv[j++];
}
argc -= 2;
- argv[argc] = NULL;
+ argv[argc] = nullptr;
}
}
@@ -1969,7 +1969,7 @@
char* end = strrchr(buf, ']');
if (start && end) {
*end = '\0';
- session_id = strtol(start + 1, NULL, 10);
+ session_id = strtol(start + 1, nullptr, 10);
}
}
if (session_id < 0) {