clang-tidy: Enable modernize-use-nullptr check
This check converts the usage of null pointer constants
(e.g. NULL, 0) to use the new C++11 and C23 nullptr keyword.
Change-Id: I8b1dc27f62e8825538d8f276c0f99375a1a5d158
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/chassis_check_power_status.cpp b/chassis_check_power_status.cpp
index 20f95e6..abb03c4 100644
--- a/chassis_check_power_status.cpp
+++ b/chassis_check_power_status.cpp
@@ -26,8 +26,8 @@
int arg;
int optIndex = 0;
- static struct option longOpts[] = {{"chassis", required_argument, 0, 'c'},
- {0, 0, 0, 0}};
+ static struct option longOpts[] = {
+ {"chassis", required_argument, nullptr, 'c'}, {nullptr, 0, nullptr, 0}};
while ((arg = getopt_long(argc, argv, "c:", longOpts, &optIndex)) != -1)
{