summaryrefslogtreecommitdiff
path: root/dbutil.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2022-04-01 12:10:48 +0800
committerMatt Johnston <matt@ucc.asn.au>2022-04-01 12:10:48 +0800
commitddbbb46e96b2ce05aaae815d8f4b3c8879e812c4 (patch)
tree53e00144df088901d0ed4aeae293a54df79c18ef /dbutil.h
parent47faf121174a9176ae4ec981b7069eabb06112bb (diff)
downloaddropbear-ddbbb46e96b2ce05aaae815d8f4b3c8879e812c4.tar.gz
Add m_snprintf() that won't return negative
Diffstat (limited to 'dbutil.h')
-rw-r--r--dbutil.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/dbutil.h b/dbutil.h
index c2d384a..64af170 100644
--- a/dbutil.h
+++ b/dbutil.h
@@ -73,6 +73,8 @@ void m_close(int fd);
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}