Date: Mon, 2 Nov 2015 00:42:31 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290251 - head/tools/regression/security/open_to_operation Message-ID: <201511020042.tA20gVfx089879@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Mon Nov 2 00:42:31 2015 New Revision: 290251 URL: https://svnweb.freebsd.org/changeset/base/290251 Log: Use nitems(x) instead of sizeof(x)/sizeof(x[0]) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/security/open_to_operation/open_to_operation.c Modified: head/tools/regression/security/open_to_operation/open_to_operation.c ============================================================================== --- head/tools/regression/security/open_to_operation/open_to_operation.c Mon Nov 2 00:39:28 2015 (r290250) +++ head/tools/regression/security/open_to_operation/open_to_operation.c Mon Nov 2 00:42:31 2015 (r290251) @@ -119,10 +119,10 @@ __FBSDID("$FreeBSD$"); */ static const int file_modes[] = { O_RDONLY, O_WRONLY, O_RDWR, O_RDONLY | O_TRUNC, O_WRONLY | O_TRUNC, O_RDWR | O_TRUNC }; -static const int file_modes_count = sizeof(file_modes) / sizeof(int); +static const int file_modes_count = nitems(file_modes); static const int dir_modes[] = { O_RDONLY }; -static const int dir_modes_count = sizeof(dir_modes) / sizeof(int); +static const int dir_modes_count = nitems(dir_modes); static int testnum; static int aio_present;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511020042.tA20gVfx089879>