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

Jon Bernard jbernard at debian.org
Fri Dec 7 15:08:14 UTC 2007

* Antti-Juhani Kaijanaho <antti-juhani at kaijanaho.fi> wrote:
> 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.

Ok, I'll leave it like it is then.

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

Ahh ;) I'll get right on that ;)

> 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:)

Old habits die hard I guess and you make a very valid point. I'll fix it
up and send out another patch with a changelog entry included.

Jon Bernard

More information about the Dctrl-tools-devel mailing list