]>
Dogcows Code - chaz/p5-File-KDBX-XS/blob - tomcrypt_argchk.h
f3884e9fd8063cceb216d06631b9ce35ca826ae0
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
4 /* Defines the LTC_ARGCHK macro used within the library */
5 /* ARGTYPE is defined in tomcrypt_cfg.h */
7 /* ARGTYPE is per default defined to 0 */
12 LTC_NORETURN
void crypt_argchk(const char *v
, const char *s
, int d
);
13 #define LTC_ARGCHK(x) do { if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } }while(0)
14 #define LTC_ARGCHKVD(x) do { if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } }while(0)
18 /* fatal type of error */
19 #define LTC_ARGCHK(x) assert((x))
20 #define LTC_ARGCHKVD(x) LTC_ARGCHK(x)
24 #define LTC_ARGCHK(x) if (!(x)) { fprintf(stderr, "\nwarning: ARGCHK failed at %s:%d\n", __FILE__, __LINE__); }
25 #define LTC_ARGCHKVD(x) LTC_ARGCHK(x)
29 #define LTC_ARGCHK(x) LTC_UNUSED_PARAM(x)
30 #define LTC_ARGCHKVD(x) LTC_ARGCHK(x)
34 #define LTC_ARGCHK(x) if (!(x)) return CRYPT_INVALID_ARG;
35 #define LTC_ARGCHKVD(x) if (!(x)) return;
This page took 0.037944 seconds and 3 git commands to generate.