Skip to content
Snippets Groups Projects
Commit f9a14b5d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Use NSPR wrappers for MAX() instead of max().

parent 43062b2e
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,7 @@
#include "sbbs.h"
#include "cmdshell.h"
#include <nspr.h>
extern "C" void client_on(SOCKET sock, client_t* client, BOOL update);
......@@ -242,7 +243,7 @@ bool sbbs_t::logon()
bprintf(text[TimeToChangePw],cfg.sys_pwdays);
c=0;
while(c < max(RAND_PASS_LEN, cfg.min_pwlen)) { /* Create random password */
while(c < PR_MAX(RAND_PASS_LEN, cfg.min_pwlen)) { /* Create random password */
str[c]=sbbs_random(43)+'0';
if(IS_ALPHANUMERIC(str[c]))
c++;
......
......@@ -38,6 +38,7 @@
#include "sbbs.h"
#include "petdefs.h"
#include "cmdshell.h"
#include <nspr.h>
/****************************************************************************/
/* This function is invoked when a user enters "NEW" at the NN: prompt */
......@@ -381,7 +382,7 @@ BOOL sbbs_t::newuser()
}
else {
c=0;
while(c < max(RAND_PASS_LEN, cfg.min_pwlen)) { /* Create random password */
while(c < PR_MAX(RAND_PASS_LEN, cfg.min_pwlen)) { /* Create random password */
useron.pass[c]=sbbs_random(43)+'0';
if(IS_ALPHANUMERIC(useron.pass[c]))
c++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment