From: Michael Haggerty <mhagger@alum.mit.edu>
To: Faiz Kothari <faiz.off93@gmail.com>
Cc: git@vger.kernel.org, sunheehnus@gmail.com, sunshine@sunshineco.com
Subject: Re: [PATCH] implemented strbuf_write_or_die()
Date: Sat, 01 Mar 2014 23:33:53 +0100 [thread overview]
Message-ID: <53126051.7030904@alum.mit.edu> (raw)
In-Reply-To: <1393680567-2166-1-git-send-email-faiz.off93@gmail.com>
Please leave a little more time for people to give feedback between
versions of a patch series (unless the first version was so broken that
it would be pointless for any other reviewer to waste time on it. And
please label the versions of a single patch series "[PATCH]" then
"[PATCH v2]", "[PATCH v3]", etc.
I agree with Johannes's advice that the function is in the wrong place
and has the wrong parameter order.
On 03/01/2014 02:29 PM, Faiz Kothari wrote:
> Signed-off-by: Faiz Kothari <faiz.off93@gmail.com>
> ---
>>> - write_or_die(1, rpc.result.buf, rpc.result.len);
>>> + strbuf_write_or_die(1, &(rpc.result.buf));
>
>> May be this should be
>> strbuf_write_or_die(1, &(rpc.result));
>
> Yes, I changed that :-) Thanks again.
I find it alarming that either the compiler didn't emit warnings for the
old version or that you ignored the compiler warnings. Git should
compile without warnings even with with quite strict compiler settings;
I use gcc with the following options
-Wall -Werror \
-Wdeclaration-after-statement \
-Wno-format-zero-length \
-Wno-format-security
Maybe you weren't including the header file that declares
strbuf_write_or_die() in the file containing this invocation?
Also, the parentheses in "&(rpc.result)" are unnecessary.
And I think that some of the blank lines that you added contained
invisible whitespace. Please check your whitespace! You can run "git
diff --check" to detect some obvious whitespace problems.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
next prev parent reply other threads:[~2014-03-01 22:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-01 11:21 [PATCH] implemented strbuf_write_or_die() Faiz Kothari
2014-03-01 12:51 ` He Sun
2014-03-01 13:29 ` Faiz Kothari
2014-03-01 22:33 ` Michael Haggerty [this message]
2014-03-02 0:18 ` [PATCH v2] " Faiz Kothari
2014-03-02 2:47 ` Eric Sunshine
2014-03-02 2:55 ` Eric Sunshine
2014-03-02 7:34 ` [PATCH v3 1/2] Introduce strbuf_write_or_die() Faiz Kothari
2014-03-02 7:34 ` [PATCH v3 2/2] use strbuf_write_or_die() Faiz Kothari
2014-03-02 22:04 ` Eric Sunshine
2014-03-02 20:05 ` [PATCH v3 1/2] Introduce strbuf_write_or_die() Eric Sunshine
2014-03-02 3:08 ` [PATCH] implemented strbuf_write_or_die() Eric Sunshine
2014-03-03 18:31 ` Junio C Hamano
[not found] ` <CAFbjVckhU7NHzLjqPo5WkoBwVLrOLg=CS6mHSKkQstUxB31_eA@mail.gmail.com>
2014-03-03 18:48 ` Fwd: " Faiz Kothari
2014-03-03 19:46 ` Eric Sunshine
2014-03-03 19:51 ` David Kastrup
2014-03-03 20:35 ` Junio C Hamano
2014-03-03 21:29 ` Eric Sunshine
2014-03-04 9:18 ` Michael Haggerty
2014-03-04 17:01 ` Faiz Kothari
2014-03-04 18:45 ` Junio C Hamano
2014-03-01 21:34 ` Johannes Sixt
2014-03-03 18:27 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53126051.7030904@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=faiz.off93@gmail.com \
--cc=git@vger.kernel.org \
--cc=sunheehnus@gmail.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).