Mercurial > dropbear
diff dbutil.h @ 1934:83b6a47759a8
Add m_snprintf() that won't return negative
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 01 Apr 2022 12:10:48 +0800 |
parents | 180e580778df |
children |
line wrap: on
line diff
--- a/dbutil.h Fri Apr 01 11:56:10 2022 +0800 +++ b/dbutil.h Fri Apr 01 12:10:48 2022 +0800 @@ -73,6 +73,8 @@ void setnonblocking(int fd); void disallow_core(void); int m_str_to_uint(const char* str, unsigned int *val); +/* The same as snprintf() but exits rather than returning negative */ +int m_snprintf(char *str, size_t size, const char *format, ...); /* Used to force mp_ints to be initialised */ #define DEF_MP_INT(X) mp_int X = {0, 0, 0, NULL}