On Mon, Aug 18, 2008 at 05:05:26PM +0200, Felix Zielcke wrote: > + unsigned char i, j, k, l;
I think using unsigned chars to store "integers" is counter-intuitive, and in some cases possibly dangerous (overflow). > + grub_dev = xmalloc (strlen (os_dev) - strlen ("/dev/mapper/") + 1); > + > + j = sizeof ("/dev/mapper/") -1; ^ Missing space here :-) > + for (i = 0, k = 0; i < l; i++) > + { > + grub_dev[k] = os_dev[j + i]; > + k++; i already counts from 0 and increments by-one. Can it be used instead of k? The rest of the code I mostly don't understand well. If you feel confident that it's right, I suggest you check it in unless someone else also wants to review it. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel