summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0077138)
raw | patch | inline | side by side (parent: 0077138)
author | Johannes Sixt <j6t@kdbg.org> | |
Mon, 8 Jun 2009 20:34:31 +0000 (22:34 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 9 Jun 2009 07:15:57 +0000 (00:15 -0700) |
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-help.c | patch | blob | history |
diff --git a/builtin-help.c b/builtin-help.c
index af565fb6588a900bca322381af6cbd93ca35d09e..6e53b23833062249485124b827da348a8be206b0 100644 (file)
--- a/builtin-help.c
+++ b/builtin-help.c
ec_process.argv = argv_ec;
ec_process.err = -1;
ec_process.stdout_to_stderr = 1;
- if (start_command(&ec_process)) {
- fprintf(stderr, "Failed to start emacsclient.\n");
- return -1;
- }
+ if (start_command(&ec_process))
+ return error("Failed to start emacsclient.");
+
strbuf_read(&buffer, ec_process.err, 20);
close(ec_process.err);
finish_command(&ec_process);
if (prefixcmp(buffer.buf, "emacsclient")) {
- fprintf(stderr, "Failed to parse emacsclient version.\n");
strbuf_release(&buffer);
- return -1;
+ return error("Failed to parse emacsclient version.");
}
strbuf_remove(&buffer, 0, strlen("emacsclient"));
version = atoi(buffer.buf);
if (version < 22) {
- fprintf(stderr,
- "emacsclient version '%d' too old (< 22).\n",
- version);
strbuf_release(&buffer);
- return -1;
+ return error("emacsclient version '%d' too old (< 22).",
+ version);
}
strbuf_release(&buffer);