logger: drop trailing space when reading message from command line
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
parent
16bad57af5
commit
22ee326192
@ -383,7 +383,7 @@ int main(int argc, char *argv[])
|
|||||||
while (optind < argc) {
|
while (optind < argc) {
|
||||||
size_t bytes;
|
size_t bytes;
|
||||||
|
|
||||||
bytes = snprintf(&buf[pos], len, "%s ", argv[optind++]);
|
bytes = snprintf(&buf[pos], len, "%s%s", pos ? " " : "", argv[optind++]);
|
||||||
pos += bytes;
|
pos += bytes;
|
||||||
len -= bytes;
|
len -= bytes;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user