From: Vojtech Pavlik <vojtech@suse.cz>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG] in drivers/char/joystick/magellan.c
Date: Tue, 28 Jan 2003 16:57:19 +0100 [thread overview]
Message-ID: <20030128165719.A382@ucw.cz> (raw)
In-Reply-To: <20030128155312.GD10685@wohnheim.fh-wedel.de>; from joern@wohnheim.fh-wedel.de on Tue, Jan 28, 2003 at 04:53:12PM +0100
On Tue, Jan 28, 2003 at 04:53:12PM +0100, Jörn Engel wrote:
> Hi!
>
> Without the patch below, the \0 terminating the string is written
> anywhere. nibbles[] would be even better, I guess.
Well, the zero isn't used, so it might make sense to use '0', 'A', 'B' ...
... though that's not very nice either.
> Can you check for stupidity on my side?
Can't find any. ;) Patch applied with [].
>
> Jörn
>
> --
> But this is not to say that the main benefit of Linux and other GPL
> software is lower-cost. Control is the main benefit--cost is secondary.
> -- Bruce Perens
>
> diff -Naur linux-2.4.21-pre3-ac4/drivers/char/joystick/magellan.c scratch/drivers/char/joystick/magellan.c
> --- linux-2.4.21-pre3-ac4/drivers/char/joystick/magellan.c Thu Sep 13 00:34:06 2001
> +++ scratch/drivers/char/joystick/magellan.c Mon Jan 27 13:49:54 2003
> @@ -66,7 +66,7 @@
>
> static int magellan_crunch_nibbles(unsigned char *data, int count)
> {
> - static unsigned char nibbles[16] = "0AB3D56GH9:K<MN?";
> + static unsigned char nibbles[17] = "0AB3D56GH9:K<MN?";
>
> do {
> if (data[count] == nibbles[data[count] & 0xf])
--
Vojtech Pavlik
SuSE Labs
next prev parent reply other threads:[~2003-01-28 15:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-28 15:53 [BUG] in drivers/char/joystick/magellan.c Jörn Engel
2003-01-28 15:57 ` Vojtech Pavlik [this message]
2003-01-28 15:59 ` Jörn Engel
2003-01-29 13:59 ` Horst von Brand
2003-01-28 17:57 ` Martin Mares
2003-01-28 18:10 ` Jörn Engel
2003-01-28 18:47 ` Randy.Dunlap
2003-01-28 21:03 ` Vojtech Pavlik
2003-01-29 12:25 ` Jörn Engel
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=20030128165719.A382@ucw.cz \
--to=vojtech@suse.cz \
--cc=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
/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.