pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/plist-utils/files



Module Name:    pkgsrc
Committed By:   adam
Date:           Thu Jun  8 18:14:51 UTC 2017

Modified Files:
        pkgsrc/pkgtools/plist-utils/files: plist_tree.c

Log Message:
Expand __arraycount macro - it is not portable


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/pkgtools/plist-utils/files/plist_tree.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/plist-utils/files/plist_tree.c
diff -u pkgsrc/pkgtools/plist-utils/files/plist_tree.c:1.1 pkgsrc/pkgtools/plist-utils/files/plist_tree.c:1.2
--- pkgsrc/pkgtools/plist-utils/files/plist_tree.c:1.1  Sat Oct  1 18:37:15 2016
+++ pkgsrc/pkgtools/plist-utils/files/plist_tree.c      Thu Jun  8 18:14:51 2017
@@ -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;
 



Home | Main Index | Thread Index | Old Index