[Dctrl-tools-devel] [PATCH] grep-dctrl.c: only print non-empty fields

Antti-Juhani Kaijanaho antti-juhani at kaijanaho.fi
Fri Dec 7 11:54:32 UTC 2007


On Thu, Dec 06, 2007 at 02:28:53PM -0500, Jon Bernard wrote:
> Re: #265907 (grep-dctrl: exclude empty lines)
> 
> Only print non-empty fields. This is not a user-settable option (yet),
> rather a first go to see how close I am.

It occurs to me that it may not be a good idea to make it optional.
I've tried to avoid changes that would break user scripts, but I have a
hard time imagining a script that would break from making this change
unconditional.

Without having tested it, the patch looks correct.  Does it pass the
testsuite? :)

You should probably include the debian/changelog entry in the commit.

> +	if (0 == r.len) {

This is of course a valid way of writing an equality comparison, and in
the days when the complilers were simplistic beings that didn't issue
warnings on nonfatal stuff, this was a good defensive mechanism against
a typo.  But really, gcc -Wall catches this typo quite well without this
style of writing.

You can probably guess from the above that I dislike this style, but I'm
not going to overrule you if you want to commit it.  (The source code is
already inconsistent on many style points:)

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
 thathttp://www.flickr.com/photos/antti-juhani/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/dctrl-tools-devel/attachments/20071207/521c5801/attachment.pgp 


More information about the Dctrl-tools-devel mailing list