From c8fdbe3013f1ac6c7e5bca00ec57aff59d8354fd Mon Sep 17 00:00:00 2001 From: Thomas O Fredericks Date: Sat, 24 Oct 2009 20:51:11 +0000 Subject: Added onlyone as a replacement for destroysend svn path=/trunk/externals/tof/; revision=12664 --- src/param.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/param.h') diff --git a/src/param.h b/src/param.h index dfe8588..1c0b3a5 100644 --- a/src/param.h +++ b/src/param.h @@ -308,28 +308,17 @@ static void param_unregister(t_param* p) { if ( paramlist) { - //p->users = p->users - 1; - //if ( p->users == 0 ) { - // Remove param - //post("Removing last param of this name"); + if (p->previous) { p->previous->next = p->next; if (p->next) p->next->previous = p->previous; - /* - if (p->next == NULL) { - p->previous->next = NULL; - } else { - p->previous->next = p->next; - } - */ + } else { paramlist = p->next; if ( p->next != NULL) p->next->previous = NULL; } - //freebytes(p->av, p->alloc * sizeof *(p->av) ); - //freebytes(p->av_g, p->ac_g * sizeof *(p->av_g) ); + freebytes(p, sizeof *p); - //} // Update the params for that root if (paramlist == NULL) { -- cgit v1.2.1