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/.clang-tidy b/.clang-tidy
index c382910..ff2531a 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -221,6 +221,7 @@
 modernize-use-equals-default,
 modernize-use-equals-delete,
 modernize-use-noexcept,
+modernize-use-nullptr,
 modernize-use-override,
 modernize-use-transparent-functors,
 modernize-use-uncaught-exceptions,
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)
     {
diff --git a/chassis_state_manager_main.cpp b/chassis_state_manager_main.cpp
index 9b31976..35f8801 100644
--- a/chassis_state_manager_main.cpp
+++ b/chassis_state_manager_main.cpp
@@ -22,8 +22,8 @@
     size_t chassisId = 0;
     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)
     {
diff --git a/discover_system_state.cpp b/discover_system_state.cpp
index 0a20bb3..892fb6c 100644
--- a/discover_system_state.cpp
+++ b/discover_system_state.cpp
@@ -47,8 +47,8 @@
     int arg;
     int optIndex = 0;
 
-    static struct option longOpts[] = {{"host", required_argument, 0, 'h'},
-                                       {0, 0, 0, 0}};
+    static struct option longOpts[] = {
+        {"host", required_argument, nullptr, 'h'}, {nullptr, 0, nullptr, 0}};
 
     while ((arg = getopt_long(argc, argv, "h:", longOpts, &optIndex)) != -1)
     {
diff --git a/host_state_manager_main.cpp b/host_state_manager_main.cpp
index e036ff5..a306a57 100644
--- a/host_state_manager_main.cpp
+++ b/host_state_manager_main.cpp
@@ -22,8 +22,8 @@
     int arg;
     int optIndex = 0;
 
-    static struct option longOpts[] = {{"host", required_argument, 0, 'h'},
-                                       {0, 0, 0, 0}};
+    static struct option longOpts[] = {
+        {"host", required_argument, nullptr, 'h'}, {nullptr, 0, nullptr, 0}};
 
     while ((arg = getopt_long(argc, argv, "h:", longOpts, &optIndex)) != -1)
     {
diff --git a/scheduled_host_transition_main.cpp b/scheduled_host_transition_main.cpp
index 6835d5d..aaecd39 100644
--- a/scheduled_host_transition_main.cpp
+++ b/scheduled_host_transition_main.cpp
@@ -17,8 +17,8 @@
     int arg;
     int optIndex = 0;
 
-    static struct option longOpts[] = {{"host", required_argument, 0, 'h'},
-                                       {0, 0, 0, 0}};
+    static struct option longOpts[] = {
+        {"host", required_argument, nullptr, 'h'}, {nullptr, 0, nullptr, 0}};
 
     while ((arg = getopt_long(argc, argv, "h:", longOpts, &optIndex)) != -1)
     {