These functions add 2 or 3 longs, saturating to LONG_{MIN,MAX} instead
of overflowing.
Cc: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
14 lines
302 B
C
14 lines
302 B
C
// SPDX-FileCopyrightText: 2023, Alejandro Colomar <alx@kernel.org>
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include "adds.h"
|
|
|
|
|
|
extern inline long addsl(long a, long b);
|
|
extern inline long addsl3(long a, long b, long c);
|
|
|
|
extern inline int cmpl(const void *p1, const void *p2);
|