From: Junio C Hamano Date: Tue, 03 May 2016 19:48:43 GMT Subject: Re: [PATCH v2 08/41] builtin/mailsplit.c: use error_errno() Message-ID: In-Reply-To: <1462277054-5943-9-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c > - error("cannot opendir %s (%s)", name, strerror(errno)); > + error_errno("cannot opendir %s", name); > - error("cannot open mail %s (%s)", file, strerror(errno)); > + error_errno("cannot open mail %s", file); > - error("cannot read mail %s (%s)", file, strerror(errno)); > + error_errno("cannot read mail %s", file); > - error("cannot stat %s (%s)", arg, strerror(errno)); > + error_errno("cannot stat %s", arg); These all used to use its own formatting, but will use ": " format like everybody else, which is good. > @@ -210,7 +210,7 @@ static int split_mbox(const char *file, const char *dir, int allow_bare, > int file_done = 0; > > if (!f) { > - error("cannot open mbox %s", file); > + error_errno("cannot open mbox %s", file); > goto out; > } It may be a bit unclear from the context, but it uses errno that was set when fopen() returned a NULL. The changes in this patch are not faithful conversion like other patches, but they are all good, I would say. Thanks.