diff options
author | adam <adam@pkgsrc.org> | 2017-06-08 18:14:51 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2017-06-08 18:14:51 +0000 |
commit | 84dea0bce321341eefd6766ac6ef4cc8611ecd6c (patch) | |
tree | ccf3fd2a7aeb055218b9b7acc04c7e7670aad4d7 /pkgtools/plist-utils | |
parent | 33c2a5427e2a91aed22bfc520ba8dedbe303eaf6 (diff) | |
download | pkgsrc-84dea0bce321341eefd6766ac6ef4cc8611ecd6c.tar.gz |
Expand __arraycount macro - it is not portable
Diffstat (limited to 'pkgtools/plist-utils')
-rw-r--r-- | pkgtools/plist-utils/files/plist_tree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgtools/plist-utils/files/plist_tree.c b/pkgtools/plist-utils/files/plist_tree.c index 82d2e6fe729..8c8e4a25ab3 100644 --- a/pkgtools/plist-utils/files/plist_tree.c +++ b/pkgtools/plist-utils/files/plist_tree.c @@ -1,4 +1,4 @@ -/* $NetBSD: plist_tree.c,v 1.1 2016/10/01 18:37:15 kamil Exp $ */ +/* $NetBSD: plist_tree.c,v 1.2 2017/06/08 18:14:51 adam Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: plist_tree.c,v 1.1 2016/10/01 18:37:15 kamil Exp $"); +__RCSID("$NetBSD: plist_tree.c,v 1.2 2017/06/08 18:14:51 adam Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -139,10 +139,10 @@ get_key(const char *entry) /* 1. Strip all ${PLIST.option}-like strings */ ret = regexec(&plist_tree_singleton.plist_regex_options, entry, - __arraycount(rm), rm, 0); + sizeof(rm)/sizeof(rm[0]), rm, 0); if (!ret) { /* Something found! */ /* Set pointer just after the matched string */ - for(i = 0; i < __arraycount(rm); i++) { + for(i = 0; i < sizeof(rm)/sizeof(rm[0]); i++) { if (rm[i].rm_so == -1) break; |