diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/remote-ext.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/remote-ext.c b/builtin/remote-ext.c index fd3538d4f0..ee338bf440 100644 --- a/builtin/remote-ext.c +++ b/builtin/remote-ext.c @@ -169,6 +169,8 @@ static int command_loop(const char *child) while (1) { size_t i; + const char *arg; + if (!fgets(buffer, MAXCOMMAND - 1, stdin)) { if (ferror(stdin)) die("Command input error"); @@ -182,10 +184,10 @@ static int command_loop(const char *child) if (!strcmp(buffer, "capabilities")) { printf("*connect\n\n"); fflush(stdout); - } else if (!strncmp(buffer, "connect ", 8)) { + } else if (skip_prefix(buffer, "connect ", &arg)) { printf("\n"); fflush(stdout); - return run_child(child, buffer + 8); + return run_child(child, arg); } else { fprintf(stderr, "Bad command"); return 1; |