]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/auth/basic/NIS/nis_support.cc
Maintenance: Removed most NULLs using modernize-use-nullptr (#1075)
[thirdparty/squid.git] / src / auth / basic / NIS / nis_support.cc
index 7a511f899a94823cd5638449fded08819d4a5386..35d4b48491f71beaf23abf621d9a5c505f98f8b0 100644 (file)
@@ -42,8 +42,8 @@
 char *
 get_nis_password(char *user, char *nisdomain, char *nismap)
 {
-    static char *val = NULL;
-    char *password = NULL;
+    static char *val = nullptr;
+    char *password = nullptr;
     int vallen, res;
 
 #ifdef DEBUG
@@ -54,7 +54,7 @@ get_nis_password(char *user, char *nisdomain, char *nismap)
     /* Free last entry */
     if (val) {
         free(val);
-        val = NULL;
+        val = nullptr;
     }
 
     /* Get NIS entry */
@@ -64,15 +64,15 @@ get_nis_password(char *user, char *nisdomain, char *nismap)
     case NO_YPERR:
         /* username = */
         (void) strtok(val, ":");
-        password = strtok(NULL, ",:");
+        password = strtok(nullptr, ",:");
         return password;
     case YPERR_YPBIND:
         syslog(LOG_ERR, "Squid Authentication through ypbind failure: can't communicate with ypbind");
-        return NULL;
+        return nullptr;
     case YPERR_KEY:     /* No such key in map */
-        return NULL;
+        return nullptr;
     default:
-        return NULL;
+        return nullptr;
     }
 }