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:
parent
2f51c6bc3b
commit
854dbca744
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue