mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 21:45:52 +00:00
Add safe_cast
* Ensure no overflow in casts between enums and integral types. * Fixes: RIPD-1702
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <ripple/basics/safe_cast.h>
|
||||
#include <ripple/basics/Sustain.h>
|
||||
#include <ripple/beast/core/CurrentThreadName.h>
|
||||
#include <boost/format.hpp>
|
||||
@@ -41,8 +42,8 @@ namespace ripple {
|
||||
static auto const sleepBeforeWaiting = 10;
|
||||
static auto const sleepBetweenWaits = 1;
|
||||
|
||||
static pid_t pManager = static_cast<pid_t> (0);
|
||||
static pid_t pChild = static_cast<pid_t> (0);
|
||||
static pid_t pManager = safe_cast<pid_t> (0);
|
||||
static pid_t pChild = safe_cast<pid_t> (0);
|
||||
|
||||
static void pass_signal (int a)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user