Replace magic number with a macro constant in smtp_config()
This commit is contained in:
parent
f55fc4fda8
commit
e400a9c1b2
1 changed files with 3 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
|||
#include "smtp.h"
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <ctime>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
@ -152,7 +153,8 @@ namespace pvpgn
|
|||
return false;
|
||||
}
|
||||
|
||||
if (prefs_smtp_port > 65535)
|
||||
// ports are 16 bit integers, so they should never be above UINT16_MAX (65,535)
|
||||
if (prefs_smtp_port > UINT16_MAX)
|
||||
{
|
||||
eventlog(eventlog_level_error, __FUNCTION__, "Received out-of-range port number ({})", prefs_smtp_port);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue