From 27079abf30fd2ed49a7d0e68dfe7dd2e7982a051 Mon Sep 17 00:00:00 2001 From: pjd Date: Tue, 27 Sep 2011 08:21:00 +0000 Subject: Prefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert(). MFC after: 3 days --- sbin/hastctl/hastctl.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sbin/hastctl') diff --git a/sbin/hastctl/hastctl.c b/sbin/hastctl/hastctl.c index 233b948..838e11d 100644 --- a/sbin/hastctl/hastctl.c +++ b/sbin/hastctl/hastctl.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -433,19 +432,19 @@ main(int argc, char *argv[]) pjdlog_debug_set(debug); cfg = yy_config_parse(cfgpath, true); - assert(cfg != NULL); + PJDLOG_ASSERT(cfg != NULL); switch (cmd) { case CMD_CREATE: control_create(argc, argv, mediasize, extentsize, keepdirty); /* NOTREACHED */ - assert(!"What are we doing here?!"); + PJDLOG_ABORT("What are we doing here?!"); break; case CMD_DUMP: /* Dump metadata from local component of the given resource. */ control_dump(argc, argv); /* NOTREACHED */ - assert(!"What are we doing here?!"); + PJDLOG_ABORT("What are we doing here?!"); break; case CMD_ROLE: /* Change role for the given resources. */ @@ -476,7 +475,7 @@ main(int argc, char *argv[]) } break; default: - assert(!"Impossible command!"); + PJDLOG_ABORT("Impossible command!"); } /* Setup control connection... */ @@ -523,7 +522,7 @@ main(int argc, char *argv[]) error = control_status(nv); break; default: - assert(!"Impossible command!"); + PJDLOG_ABORT("Impossible command!"); } exit(error); -- cgit v1.1