WINCHAIN cleanup
This started out as some formatting cleanup for src/windows.c but ended up removing calloc() from the WINCHAIN code, plus fixing a couple of compiler complaints for win/chain/wc_trace.c. I tried to actually run with +trace enabled and never managed to get anything to happen. trace_procs_init() was never called. I've never tried to use it before so don't know whether something which used to work has gotten broken or I'm just doing it wrong.
This commit is contained in:
+14
-11
@@ -27,23 +27,26 @@ void *me;
|
||||
void *nextprocs;
|
||||
void *nextdata;
|
||||
{
|
||||
struct chainin_data *tdp = 0;
|
||||
|
||||
switch (cmd) {
|
||||
case WINCHAIN_ALLOC: {
|
||||
struct chainin_data *tdp = calloc(1, sizeof(struct chainin_data));
|
||||
case WINCHAIN_ALLOC:
|
||||
tdp = (struct chainin_data *) alloc(sizeof *tdp);
|
||||
tdp->nprocs = 0;
|
||||
tdp->ndata = 0;
|
||||
tdp->linknum = n;
|
||||
cibase = tdp;
|
||||
return tdp;
|
||||
}
|
||||
case WINCHAIN_INIT: {
|
||||
struct chainin_data *tdp = me;
|
||||
cibase = 0;
|
||||
break;
|
||||
case WINCHAIN_INIT:
|
||||
tdp = me;
|
||||
tdp->nprocs = nextprocs;
|
||||
tdp->ndata = nextdata;
|
||||
return tdp;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
raw_printf("chainin_procs_chain: bad cmd\n");
|
||||
exit(EXIT_FAILURE);
|
||||
panic("chainin_procs_chain: bad cmd\n");
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
return tdp;
|
||||
}
|
||||
|
||||
/* XXX if we don't need this, take it out of the table */
|
||||
|
||||
Reference in New Issue
Block a user