[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 01/75: pfinet: fix sanity check at translator startup time
From: |
Samuel Thibault |
Subject: |
[hurd] 01/75: pfinet: fix sanity check at translator startup time |
Date: |
Thu, 14 Jan 2016 01:04:01 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit d9a22b92a226419c50fd13013741679ce7e7b624
Author: Justus Winter <address@hidden>
Date: Tue Nov 3 22:44:07 2015 +0100
pfinet: fix sanity check at translator startup time
* pfinet/main.c (main): Properly iterate over `pfinet_protid_portclasses'.
---
pfinet/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pfinet/main.c b/pfinet/main.c
index 46457a9..4bfa318 100644
--- a/pfinet/main.c
+++ b/pfinet/main.c
@@ -269,6 +269,8 @@ extern void sk_init (void), skb_init (void);
extern int net_dev_init (void);
extern void inet6_proto_init (struct net_proto *pro);
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
int
main (int argc,
char **argv)
@@ -374,11 +376,11 @@ main (int argc,
int i;
/* Check that at least one portclass has been bound,
error out otherwise. */
- for (i = 0; i < trivfs_protid_nportclasses; i ++)
+ for (i = 0; i < ARRAY_SIZE (pfinet_protid_portclasses); i++)
if (pfinet_protid_portclasses[i] != MACH_PORT_NULL)
break;
- if (i == trivfs_protid_nportclasses)
+ if (i == ARRAY_SIZE (pfinet_protid_portclasses))
error (1, 0, "should be started as a translator.\n");
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 13/75: Clean debugging macro, (continued)
- [hurd] 13/75: Clean debugging macro, Samuel Thibault, 2016/01/13
- [hurd] 09/75: libihash: optimize lookup-or-insert operations, Samuel Thibault, 2016/01/13
- [hurd] 03/75: Remove unused variables, Samuel Thibault, 2016/01/13
- [hurd] 17/75: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd into dde, Samuel Thibault, 2016/01/13
- [hurd] 19/75: Add devnode documentation, Samuel Thibault, 2016/01/13
- [hurd] 23/75: Add missing menus, Samuel Thibault, 2016/01/13
- [hurd] 20/75: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd into dde, Samuel Thibault, 2016/01/13
- [hurd] 12/75: Merge branch 'dde' of ssh://git.savannah.gnu.org/srv/git/hurd/incubator into dde, Samuel Thibault, 2016/01/13
- [hurd] 02/75: libtrivfs: remove deprecated static class vectors, Samuel Thibault, 2016/01/13
- [hurd] 05/75: random: improve error handling, Samuel Thibault, 2016/01/13
- [hurd] 01/75: pfinet: fix sanity check at translator startup time,
Samuel Thibault <=
- [hurd] 22/75: Fix undefined reference, Samuel Thibault, 2016/01/13
- [hurd] 24/75: Use -L instead of -Wl,-rpath-link, Samuel Thibault, 2016/01/13
- [hurd] 26/75: libihash: fix fast insertion corner case, Samuel Thibault, 2016/01/13
- [hurd] 25/75: libihash: fix ill-devised locp lookup interface, Samuel Thibault, 2016/01/13
- [hurd] 21/75: Drop spurious debugging or outdated changes, Samuel Thibault, 2016/01/13
- [hurd] 14/75: Add devnode translator, Samuel Thibault, 2016/01/13
- [hurd] 30/75: ext2fs: improve the block cache, Samuel Thibault, 2016/01/13
- [hurd] 28/75: libihash: fix item insertion, Samuel Thibault, 2016/01/13
- [hurd] 66/75: Make private variables static, Samuel Thibault, 2016/01/13
- [hurd] 32/75: ext2fs: keep list of reusable disk cache entries, Samuel Thibault, 2016/01/13