From b9f4d11d0ab8d436d1db97649f2e2ec63186fdce Mon Sep 17 00:00:00 2001 From: ccremers Date: Thu, 12 Aug 2004 13:22:49 +0000 Subject: [PATCH] - Some cleanup writes, e.g. making initalisation code order correspond to struct field order. --- src/arachne.c | 5 ++++- src/role.c | 4 ++-- src/system.c | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/arachne.c b/src/arachne.c index fe4a87c..ced577e 100644 --- a/src/arachne.c +++ b/src/arachne.c @@ -73,7 +73,7 @@ arachneInit (const System mysys) rd = NULL; r->next = INTRUDER->roles; INTRUDER->roles = r; - compute_role_variables (sys, INTRUDER, r); + // compute_role_variables (sys, INTRUDER, r); return r; } @@ -160,6 +160,9 @@ iterate_role_sends (int (*func) ()) { if (rd->type == SEND) { + int x; + + x = 1; if (!func (p, r, rd, index)) return 0; } diff --git a/src/role.c b/src/role.c index 6871c4c..b1b2952 100644 --- a/src/role.c +++ b/src/role.c @@ -191,10 +191,10 @@ roleCreate (Term name) r = memAlloc (sizeof (struct role)); r->nameterm = name; - r->next = NULL; + r->roledef = NULL; r->locals = NULL; r->variables = NULL; - r->roledef = NULL; + r->next = NULL; return r; } diff --git a/src/system.c b/src/system.c index c7bdae6..f9984d1 100644 --- a/src/system.c +++ b/src/system.c @@ -798,10 +798,10 @@ protocolCreate (Term name) p = memAlloc (sizeof (struct protocol)); p->nameterm = name; - p->rolenames = NULL; - p->next = NULL; p->roles = NULL; + p->rolenames = NULL; p->locals = NULL; + p->next = NULL; return p; }