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:
parent
02cb202a69
commit
1253cccd76
2 changed files with 66 additions and 66 deletions
|
@ -106,8 +106,8 @@ sendcmd(int s, char *cmd, char *arg)
|
||||||
ssize_t n;
|
ssize_t n;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
len = snprintf(buf, sizeof(buf), "%s %s\n",
|
len = snprintf(buf, sizeof(buf), "%s%s%s\n",
|
||||||
cmd, arg != NULL ? arg : "");
|
cmd, arg ? " " : "", arg ? arg : "");
|
||||||
if (len >= (int)sizeof(buf)) {
|
if (len >= (int)sizeof(buf)) {
|
||||||
fprintf(stderr, "%s too long\n", cmd);
|
fprintf(stderr, "%s too long\n", cmd);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue