ref: 404d54da08d6d17b0b2a928236069978fd539c72
parent: 2707beb7b46cf29fb1ebafad33edf8d48041ed50
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Jun 5 15:46:16 EDT 2023
ndb/cs: avoid trailing spaces when printing ndb line
--- a/sys/src/cmd/ndb/cs.c
+++ b/sys/src/cmd/ndb/cs.c
@@ -192,12 +192,14 @@
static int
ndblinefmt(Fmt *f)
{
+ char *sep = "";
Ndbtuple *t;
for(t = va_arg(f->args, Ndbtuple*); t != nil; t = t->entry) {
- fmtprint(f, "%s=%$ ", t->attr, t->val);
+ fmtprint(f, "%s%s=%$", sep, t->attr, t->val);
if(t->line != t->entry)
break;
+ sep = " ";
}
return 0;
}