2004-07-11 Marco Gerards <metgerards@student.han.nl>

* disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
	one block instead of two when looking for the initial partition.
	(grub_partition_probe): Initialize the local variable `p' with 0.
	Use base 10 for the grub_strtoul call.
	* kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
	need for one local variable.
	(grub_strtoul): Don't add the new value to `num', instead of that
	just assign it.
This commit is contained in:
marco_g 2004-07-11 14:24:54 +00:00
parent 020616c2b2
commit e15199cb7b
3 changed files with 18 additions and 8 deletions

View file

@ -64,10 +64,9 @@ char *
grub_strncpy (char *dest, const char *src, int c)
{
char *p = dest;
int pos = 0;
while ((*p++ = *src++) != '\0' && c > pos)
pos++;
while ((*p++ = *src++) != '\0' && --c)
;
return dest;
}
@ -285,7 +284,7 @@ grub_strtoul (const char *str, char **end, int base)
return 0;
}
num += num * base + digit;
num = num * base + digit;
str++;
}