/* Copyright (c) 2003-2004, Roger Dingledine
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2020, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file addsub.c
*
* \brief Helpers for addition and subtraction.
*
* Currently limited to non-wrapping (saturating) addition.
**/
/* Helper: safely add two uint32_t's, capping at UINT32_MAX rather
* than overflow */
uint32_t