summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-04-03 00:32:05 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-04-03 00:32:05 +0800
commitf267ca1f3a51a465ee98d0cfd230c40ddfeda332 (patch)
tree63df9ffdf56d4f169adcd8ae2c6bf9b85e428092
parente5072c6b120b49571f6bf0a989e1d8dc505a1cd9 (diff)
Add sentinel attribute
--HG-- branch : kexguess
-rw-r--r--bignum.h2
-rw-r--r--dbutil.h8
2 files changed, 4 insertions, 6 deletions
diff --git a/bignum.h b/bignum.h
index 042f811..cabb4a2 100644
--- a/bignum.h
+++ b/bignum.h
@@ -28,7 +28,7 @@
#include "includes.h"
void m_mp_init(mp_int *mp);
-void m_mp_init_multi(mp_int *mp, ...);
+void m_mp_init_multi(mp_int *mp, ...) ATTRIB_SENTINEL;
void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len);
void sha1_process_mp(hash_state *hs, mp_int *mp);
diff --git a/dbutil.h b/dbutil.h
index fc01251..3af79f7 100644
--- a/dbutil.h
+++ b/dbutil.h
@@ -35,14 +35,12 @@ void startsyslog();
#ifdef __GNUC__
#define ATTRIB_PRINTF(fmt,args) __attribute__((format(printf, fmt, args)))
-#else
-#define ATTRIB_PRINTF(fmt,args)
-#endif
-
-#ifdef __GNUC__
#define ATTRIB_NORETURN __attribute__((noreturn))
+#define ATTRIB_SENTINEL __attribute__((sentinel))
#else
+#define ATTRIB_PRINTF(fmt,args)
#define ATTRIB_NORETURN
+#define ATTRIB_SENTINEL
#endif
extern void (*_dropbear_exit)(int exitcode, const char* format, va_list param) ATTRIB_NORETURN;