Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Jan 2011 15:52:00 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r218132 - head/sbin/hastd
Message-ID:  <201101311552.p0VFq0k1029086@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Mon Jan 31 15:52:00 2011
New Revision: 218132
URL: http://svn.freebsd.org/changeset/base/218132

Log:
  Rename pjdlog_verify() to pjdlog_abort() as it better describes what the
  the function does and mark it with __dead2.
  
  MFC after:	1 week

Modified:
  head/sbin/hastd/pjdlog.c
  head/sbin/hastd/pjdlog.h

Modified: head/sbin/hastd/pjdlog.c
==============================================================================
--- head/sbin/hastd/pjdlog.c	Mon Jan 31 15:42:42 2011	(r218131)
+++ head/sbin/hastd/pjdlog.c	Mon Jan 31 15:52:00 2011	(r218132)
@@ -437,10 +437,10 @@ pjdlog_exitx(int exitcode, const char *f
 }
 
 /*
- * Log assertion and exit.
+ * Log failure message and exit.
  */
 void
-pjdlog_verify(const char *func, const char *file, int line,
+pjdlog_abort(const char *func, const char *file, int line,
     const char *failedexpr, const char *fmt, ...)
 {
 	va_list ap;

Modified: head/sbin/hastd/pjdlog.h
==============================================================================
--- head/sbin/hastd/pjdlog.h	Mon Jan 31 15:42:42 2011	(r218131)
+++ head/sbin/hastd/pjdlog.h	Mon Jan 31 15:52:00 2011	(r218132)
@@ -89,22 +89,22 @@ void pjdlogv_exit(int exitcode, const ch
 void pjdlog_exitx(int exitcode, const char *fmt, ...) __printflike(2, 3) __dead2;
 void pjdlogv_exitx(int exitcode, const char *fmt, va_list ap) __printflike(2, 0) __dead2;
 
-void pjdlog_verify(const char *func, const char *file, int line,
-    const char *failedexpr, const char *fmt, ...) __printflike(5, 6);
+void pjdlog_abort(const char *func, const char *file, int line,
+    const char *failedexpr, const char *fmt, ...) __printflike(5, 6) __dead2;
 
 #define	PJDLOG_VERIFY(expr)	do {					\
 	if (!(expr)) {							\
-		pjdlog_verify(__func__, __FILE__, __LINE__, #expr,	\
+		pjdlog_abort(__func__, __FILE__, __LINE__, #expr,	\
 		    __func__);						\
 	}								\
 } while (0)
 #define	PJDLOG_RVERIFY(expr, ...)	do {				\
 	if (!(expr)) {							\
-		pjdlog_verify(__func__, __FILE__, __LINE__, #expr,	\
+		pjdlog_abort(__func__, __FILE__, __LINE__, #expr,	\
 		    __VA_ARGS__);					\
 	}								\
 } while (0)
-#define	PJDLOG_ABORT(...)	pjdlog_verify(__func__, __FILE__,	\
+#define	PJDLOG_ABORT(...)	pjdlog_abort(__func__, __FILE__,	\
 				    __LINE__, NULL, __VA_ARGS__)
 #ifdef NDEBUG
 #define	PJDLOG_ASSERT(expr)	do { } while (0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101311552.p0VFq0k1029086>