1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

formatting: no braces for single statement if/then/else branches

This commit is contained in:
Steffen Vogel 2020-03-10 19:11:26 +01:00 committed by Steffen Vogel
parent 2f51c6bc3b
commit 854dbca744

View file

@ -44,18 +44,17 @@ int iotagent_ul_sprint(struct io *io, char *buf, size_t len, size_t *wbytes, str
if (!sig)
return -1;
if (sig->name) {
if (sig->name)
printed += snprintf(buf + printed, len - printed, "%s|%f|", sig->name, smp->data[i].f);
} else {
else {
char name[32];
snprintf(name, 32, "signal_%d", i);
printed += snprintf(buf + printed, len - printed, "%s|%f|", name, smp->data[i].f);
}
}
if (wbytes) {
if (wbytes)
*wbytes = printed - 1; // -1 to cut off last '|'
}
return 0;
}