Date: Tue, 27 Sep 2011 08:21:01 +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: r225785 - head/sbin/hastctl Message-ID: <201109270821.p8R8L1Yd012416@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Tue Sep 27 08:21:00 2011 New Revision: 225785 URL: http://svn.freebsd.org/changeset/base/225785 Log: Prefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert(). MFC after: 3 days Modified: head/sbin/hastctl/hastctl.c Modified: head/sbin/hastctl/hastctl.c ============================================================================== --- head/sbin/hastctl/hastctl.c Tue Sep 27 08:04:01 2011 (r225784) +++ head/sbin/hastctl/hastctl.c Tue Sep 27 08:21:00 2011 (r225785) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include <sys/stat.h> #include <sys/sysctl.h> -#include <assert.h> #include <err.h> #include <errno.h> #include <fcntl.h> @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109270821.p8R8L1Yd012416>