client: Send login commands without trailing space

Cosmetical improvement; the server is just fine with trailing space.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2013-05-31 10:02:54 +02:00
parent 02cb202a69
commit 1253cccd76
2 changed files with 66 additions and 66 deletions

View file

@ -106,8 +106,8 @@ sendcmd(int s, char *cmd, char *arg)
ssize_t n;
int len;
len = snprintf(buf, sizeof(buf), "%s %s\n",
cmd, arg != NULL ? arg : "");
len = snprintf(buf, sizeof(buf), "%s%s%s\n",
cmd, arg ? " " : "", arg ? arg : "");
if (len >= (int)sizeof(buf)) {
fprintf(stderr, "%s too long\n", cmd);
exit(1);