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
/* Free last entry */
if (val) {
free(val);
- val = NULL;
+ val = nullptr;
}
/* Get NIS entry */
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;
}
}