* grub-core/fs/ext2.c (grub_ext2_read_symlink): Use memcpy rather

strncpy.
	* grub-core/fs/jfs.c (grub_jfs_lookup_symlink): Likewise.
	* grub-core/kern/misc.c (grub_strncpy): Move from here ...
	* include/grub/misc.h (grub_strncpy): ... to here. Make inline.
	* grub-core/net/net.c (grub_net_addr_to_str): Use COMPILE_TIME_ASSERT
	+ strcpy rather than strncpy.
This commit is contained in:
Vladimir Serbinenko 2013-11-01 18:44:46 +01:00
parent 8fbe5c7df7
commit eb03ede014
6 changed files with 29 additions and 19 deletions

View file

@ -94,17 +94,6 @@ grub_strcpy (char *dest, const char *src)
return dest;
}
char *
grub_strncpy (char *dest, const char *src, int c)
{
char *p = dest;
while ((*p++ = *src++) != '\0' && --c)
;
return dest;
}
int
grub_printf (const char *fmt, ...)
{