All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Jim Meyering <jim@meyering.net>
Cc: Project Hail <hail-devel@vger.kernel.org>
Subject: Re: [PATCH tabled 1/2] server/config.c: don't dereference NULL on OOM
Date: Thu, 23 Sep 2010 15:19:35 -0400	[thread overview]
Message-ID: <4C9BA847.5030703@garzik.org> (raw)
In-Reply-To: <87zkv8yhnu.fsf@meyering.net>

On 09/23/2010 04:43 AM, Jim Meyering wrote:
>> From fb7865d158b0d32907dde703c4d37c70a26e738c Mon Sep 17 00:00:00 2001
> From: Jim Meyering<meyering@redhat.com>
> Date: Thu, 23 Sep 2010 10:11:44 +0200
> Subject: [PATCH tabled 1/2] server/config.c: don't dereference NULL on OOM

(see other email for general response to these changes, comments on 
GLib, OOM, etc.)

First off, I ACK (accept) all these changes.  Technically they appear 
correct, and I am interested in merging them.

But I request a few minor style and workflow adjustments, and a 
resubmission. Specific comments:

[style]

1) the functional style of sizeof keyword, with parens, is preferred:

-			snprintf(s, 64, "get user '%s'", user);
+			snprintf(s, sizeof s, "get user '%s'", user);


2) it is preferred to omit optional braces for singleton test+stmt style 
statements:

+	if (!pass) {
+		goto err_cmp;
+	}


[patch submission administrivia]

3) I process patches similar to how Linus and others in the kernel do 
it: "git am /path/to/mbox_of_patches"  That tends to impose some 
restrictions on the contents of each email.

In your case, while the patch descriptions and diffs themselves are 
correct, you seem to be sending one-mbox-per-email, while I'm expecting 
one-patch-per-email.  If you could tweak your process to make that 
change, that would reduce the manual labor on my part.


4) While total number of patches is not really a problem, I would 
request sweeping most of the one-and-two-liners in this series into a 
single patch, leaving perhaps only the bucket.c and status.c changes as 
standalone patches.

It's more an art and style preferences, than science, when deciding how 
to separate out changes into patches. Trying to take my cues from the 
kernel, it is preferred, for example, that bug fixes be separate from 
new features, or whitespace and cosmetic changes separate from 
functional changes.  But it is also encouraged to group similar changes 
together, if, for example, you're making a similar change across a large 
number of files.

Mailing list review-ability, useful 'git bisect' boundaries, and a 
coherent 'git shortlog' summary tend to be my guides when deciding patch 
boundaries.

Thanks!

	Jeff



  parent reply	other threads:[~2010-09-23 19:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23  8:43 [PATCH tabled 1/2] server/config.c: don't dereference NULL on OOM Jim Meyering
2010-09-23 18:57 ` Jeff Garzik
2010-09-23 19:19 ` Jeff Garzik [this message]
2010-09-23 19:35   ` Jeff Garzik
2010-09-24 11:32     ` Jim Meyering
2010-09-24 11:55       ` Jim Meyering
2010-09-24 17:24       ` Jeff Garzik
2010-09-24 17:43         ` Jim Meyering
2010-09-24 17:50           ` Jeff Garzik
2010-09-24 11:02   ` Jim Meyering

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=4C9BA847.5030703@garzik.org \
    --to=jeff@garzik.org \
    --cc=hail-devel@vger.kernel.org \
    --cc=jim@meyering.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.