diff --git a/src/ioc/db/dbChannel.c b/src/ioc/db/dbChannel.c index ec85da201..70a22409a 100644 --- a/src/ioc/db/dbChannel.c +++ b/src/ioc/db/dbChannel.c @@ -642,13 +642,10 @@ void dbChannelShow(dbChannel *chan, int level, const unsigned short indent) int count = ellCount(&chan->filters); int pre = ellCount(&chan->pre_chain); int post = ellCount(&chan->post_chain); - int i; - for (i = 0; i < indent; i++) printf(" "); - printf("channel name: %s\n", chan->name); - for (i = 0; i < indent; i++) printf(" "); + printf("%*schannel name: %s\n", indent, "", chan->name); /* FIXME: show field_type as text */ - printf(" field_type=%d (%dB), %ld element%s, %d filter%s", + printf("%*s field_type=%d (%dB), %ld element%s, %d filter%s", indent, "", chan->addr.field_type, chan->addr.field_size, elems, elems == 1 ? "" : "s", count, count == 1 ? "" : "s"); if (count) @@ -658,9 +655,8 @@ void dbChannelShow(dbChannel *chan, int level, const unsigned short indent) if (level > 0) dbChannelFilterShow(chan, level - 1, indent + 2); if (count) { - for (i = 0; i < indent; i++) printf(" "); /* FIXME: show field_type as text */ - printf(" final field_type=%d (%dB), %ld element%s\n", + printf("%*s final field_type=%d (%dB), %ld element%s\n", indent, "", chan->final_type, chan->final_field_size, felems, felems == 1 ? "" : "s"); } } diff --git a/src/ioc/db/filters/ts.c b/src/ioc/db/filters/ts.c index 26c56bfb8..5bf2d4898 100644 --- a/src/ioc/db/filters/ts.c +++ b/src/ioc/db/filters/ts.c @@ -16,7 +16,7 @@ #include #include -static db_field_log* tsFilter(void* pvt, dbChannel *chan, db_field_log *pfl) { +static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) { epicsTimeStamp now; epicsTimeGetCurrent(&now); @@ -32,17 +32,15 @@ static db_field_log* tsFilter(void* pvt, dbChannel *chan, db_field_log *pfl) { static void channelRegisterPre(dbChannel *chan, void *pvt, chPostEventFunc **cb_out, void **arg_out, db_field_log *probe) { - *cb_out = tsFilter; + *cb_out = filter; } -void channel_report(dbChannel *chan, void *user, int level, const unsigned short indent) +static void channel_report(dbChannel *chan, void *pvt, int level, const unsigned short indent) { - int i; - for (i = 0; i < indent; i++) printf(" "); - printf(" plugin ts\n"); + printf("%*s plugin ts\n", indent, ""); } -static chfPluginIf tsPif = { +static chfPluginIf pif = { NULL, /* allocPvt, */ NULL, /* freePvt, */ @@ -63,7 +61,7 @@ static void tsInitialize(void) if(!firstTime) return; firstTime = 0; - chfPluginRegister("ts", &tsPif, NULL); + chfPluginRegister("ts", &pif, NULL); } epicsExportRegistrar(tsInitialize);