Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/am.c: use error_errno()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 8 May 2016 09:47:24 +0000
(16:47 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 9 May 2016 19:29:08 +0000
(12:29 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/am.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
23e7a31
)
diff --git
a/builtin/am.c
b/builtin/am.c
index d003939bc5c65947451de4a6e1817eb0f184211f..3dfe70b7a039afadf2de4dfe8f809e3321287004 100644
(file)
--- a/
builtin/am.c
+++ b/
builtin/am.c
@@
-769,15
+769,15
@@
static int split_mail_conv(mail_conv_fn fn, struct am_state *state,
in = fopen(*paths, "r");
if (!in)
in = fopen(*paths, "r");
if (!in)
- return error
(_("could not open '%s' for reading: %s
"),
-
*paths, strerror(errno)
);
+ return error
_errno(_("could not open '%s' for reading
"),
+
*paths
);
mail = mkpath("%s/%0*d", state->dir, state->prec, i + 1);
out = fopen(mail, "w");
if (!out)
mail = mkpath("%s/%0*d", state->dir, state->prec, i + 1);
out = fopen(mail, "w");
if (!out)
- return error
(_("could not open '%s' for writing: %s
"),
-
mail, strerror(errno)
);
+ return error
_errno(_("could not open '%s' for writing
"),
+
mail
);
ret = fn(out, in, keep_cr);
ret = fn(out, in, keep_cr);
@@
-857,8
+857,7
@@
static int split_mail_stgit_series(struct am_state *state, const char **paths,
fp = fopen(*paths, "r");
if (!fp)
fp = fopen(*paths, "r");
if (!fp)
- return error(_("could not open '%s' for reading: %s"), *paths,
- strerror(errno));
+ return error_errno(_("could not open '%s' for reading"), *paths);
while (!strbuf_getline_lf(&sb, fp)) {
if (*sb.buf == '#')
while (!strbuf_getline_lf(&sb, fp)) {
if (*sb.buf == '#')