Re: [PATCH] implemented strbuf_write_or_die()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 3, 2014, 18:27 UTC
- Message-ID
- <xmqqzjl7qgsd.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1393672871-28281-1-git-send-email-faiz.off93@gmail.com>
Faiz Kothari <faiz.off93@gmail.com> writes:
Show 24 quoted lines
> Signed-off-by: Faiz Kothari <faiz.off93@gmail.com> > --- > Implemented write_or_die.c:strbuf_write_or_die() and used in relevant places > to substitute write_or_die(). I spotted other places where strbuf can be used > in place of buf[MAX_PATH] but that would require a change in prototype of a > lot of functions and functions calling them and so on.... > I'll look for more places where strbuf can be used safely. > > Thanks. > > builtin/cat-file.c | 2 +- > builtin/notes.c | 4 ++-- > builtin/receive-pack.c | 2 +- > builtin/send-pack.c | 2 +- > builtin/stripspace.c | 2 +- > builtin/tag.c | 2 +- > bundle.c | 2 +- > cache.h | 1 + > credential-store.c | 2 +- > fetch-pack.c | 2 +- > http-backend.c | 2 +- > remote-curl.c | 8 +++++--- > write_or_die.c | 9 +++++++++ > 13 files changed, 26 insertions(+), 14 deletions(-)
It does not reduce the code, it does not make the resulting code read any easier.
What is the benefit of this change?