Date: Sat, 30 Jul 2016 06:35:49 +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: r303541 - head/usr.bin/calendar Message-ID: <201607300635.u6U6Zn68083704@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: araujo Date: Sat Jul 30 06:35:49 2016 New Revision: 303541 URL: https://svnweb.freebsd.org/changeset/base/303541 Log: Use nitems() from sys/param.h. Sponsored by: gandi.net (BSD Day Taiwan) MFC after: 2 weeks. Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Sat Jul 30 06:32:18 2016 (r303540) +++ head/usr.bin/calendar/io.c Sat Jul 30 06:35:49 2016 (r303541) @@ -117,7 +117,7 @@ cal_fopen(const char *file) return (NULL); } - for (i = 0; i < sizeof(calendarHomes)/sizeof(calendarHomes[0]) ; i++) { + for (i = 0; i < nitems(calendarHomes); i++) { if (chdir(calendarHomes[i]) != 0) continue;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607300635.u6U6Zn68083704>