[patch] Move negative checks to util.c, from acpi.c (resend)
Richard Hughes
hughsient at gmail.com
Fri Aug 19 07:50:50 PDT 2005
On Fri, 2005-08-19 at 10:16 -0400, David Zeuthen wrote:
> On Fri, 2005-08-19 at 09:01 +0100, Richard Hughes wrote:
> > On Thu, 2005-08-18 at 13:12 +0200, Danny Kukawka wrote:
> > > Again: I don't understood: What the difference for you to handle 101% as error
> > > or -1 ? "-1" Is a well defined return value at all (kernel, userspace
> > > programmes with return values >= 0).
> >
> > Point taken, I'm just trying to make like easier for myself (coding
> > g-p-m :-).
> >
> > I agree now, "-1" makes most sense as a "unknown" value. DavidZ's idea
> > of not setting the key is also a nice idea as we are not providing a
> > value, although this gets tricky if the key is already set, as we will
> > then have to remove the key. I vote -1.
>
> I'd still say just omit the property if we don't know what to set it
> too. Introducing magic numbers is almost always a bad idea.
Agreed, what about the attached? Good to commit?
Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-diff-2005-08-19-15-49-21.patch
Type: text/x-patch
Size: 10036 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20050819/d2ecd8c9/hal-diff-2005-08-19-15-49-21.bin
More information about the hal
mailing list