X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=send-pack.c;h=512b660e99f26e391df34d48e1aebc9c6c3250e7;hb=d81bf827192f0af6b1cca64d2cdbaac9b5ca2020;hp=cd478dd82fdc08094873112b40cbf302623ecc21;hpb=d23842fd53e61f32c189a6ec902c4133abf29878;p=git.git diff --git a/send-pack.c b/send-pack.c index cd478dd82..512b660e9 100644 --- a/send-pack.c +++ b/send-pack.c @@ -25,6 +25,8 @@ static int pack_objects(int fd, struct ref *refs) if (pipe(pipe_fd) < 0) return error("send-pack: pipe failed"); pid = fork(); + if (pid < 0) + return error("send-pack: unable to fork git-pack-objects"); if (!pid) { /* * The child becomes pack-objects --revs; we feed @@ -377,11 +379,11 @@ int main(int argc, char **argv) char *arg = *argv; if (*arg == '-') { - if (!strncmp(arg, "--receive-pack=", 15)) { + if (!prefixcmp(arg, "--receive-pack=")) { receivepack = arg + 15; continue; } - if (!strncmp(arg, "--exec=", 7)) { + if (!prefixcmp(arg, "--exec=")) { receivepack = arg + 7; continue; }