Date: Wed, 20 Apr 2016 00:55:35 +0000 (UTC) From: Marcelo Araujo <araujo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298317 - head/sbin/hastd Message-ID: <201604200055.u3K0tZs7018638@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: araujo Date: Wed Apr 20 00:55:35 2016 New Revision: 298317 URL: https://svnweb.freebsd.org/changeset/base/298317 Log: Use nitems() from sys/param.h. MFC after: 2 weeks. Modified: head/sbin/hastd/subr.c Modified: head/sbin/hastd/subr.c ============================================================================== --- head/sbin/hastd/subr.c Wed Apr 20 00:50:17 2016 (r298316) +++ head/sbin/hastd/subr.c Wed Apr 20 00:55:35 2016 (r298317) @@ -247,7 +247,7 @@ drop_privs(const struct hast_resource *r "Unable to limit capability rights on local descriptor"); } if (cap_ioctls_limit(res->hr_localfd, geomcmds, - sizeof(geomcmds) / sizeof(geomcmds[0])) == -1) { + nitems(geomcmds)) == -1) { pjdlog_errno(LOG_ERR, "Unable to limit allowed GEOM ioctls"); } @@ -266,7 +266,7 @@ drop_privs(const struct hast_resource *r "Unable to limit capability rights to CAP_IOCTL on ggate descriptor"); } if (cap_ioctls_limit(res->hr_ggatefd, ggatecmds, - sizeof(ggatecmds) / sizeof(ggatecmds[0])) == -1) { + nitems(ggatecmds)) == -1) { pjdlog_errno(LOG_ERR, "Unable to limit allowed ggate ioctls"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604200055.u3K0tZs7018638>