[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090914044657.GA4252@merkur.ravnborg.org>
Date: Mon, 14 Sep 2009 06:46:57 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: Felipe Contreras <felipe.contreras@...il.com>
Cc: Mike Frysinger <vapier.adi@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] kbuild: fix warning when domainname is not
available
On Mon, Sep 14, 2009 at 01:04:11AM +0300, Felipe Contreras wrote:
> On Mon, Sep 14, 2009 at 12:58 AM, Mike Frysinger <vapier.adi@...il.com> wrote:
> > .
> > On Sun, Sep 13, 2009 at 17:42, Felipe Contreras
> > <felipe.contreras@...il.com> wrote:
> >> On Mon, Sep 14, 2009 at 12:12 AM, Mike Frysinger <vapier.adi@...il.com> wrote:
> >>> On Sun, Sep 13, 2009 at 15:38, Felipe Contreras wrote:
> >>>> + if $domain; then
> >>>
> >>> is this really correct ? i think you meant to use:
> >>> [ -n "$domain" ]
> >>
> >> What is the difference?
> >>
> >> $domain unset
> >> test -n "" -> false
> >> test -> false
> >>
> >> $domain is a valid string
> >> test -n "string" -> true
> >> test "string" -> true
> >
> > except that you didnt invoke `test` anywhere. you're executing the
> > contents of $domain.
>
> Ahh, I'll update it to:
> [ "$domain" ]
Please use [ -n "$domain" ].
Be explicit about what you do.
[Likewise in c we never omit "int" just because we can].
Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists