4a2646f676
These functions reject negative numbers, instead of silently converting them into unsigned, which strtou[l]l(3) do. Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com> Cc: "Serge E. Hallyn" <serge@hallyn.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
14 lines
359 B
C
14 lines
359 B
C
// SPDX-FileCopyrightText: 2023, Alejandro Colomar <alx@kernel.org>
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include "atoi/strtou_noneg.h"
|
|
|
|
|
|
extern inline unsigned long strtoul_noneg(const char *s,
|
|
char **restrict endp, int base);
|
|
extern inline unsigned long long strtoull_noneg(const char *s,
|
|
char **restrict endp, int base);
|