diff options
author | Ben Whitten <ben.whitten@gmail.com> | 2015-12-30 13:05:58 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-01-14 22:11:34 -0500 |
commit | 192bc6948b02ff4168cab16162fffb507946dc2b (patch) | |
tree | b49cf85a3fa910182ce7dc2508f00ccb8ade03d4 /disk/part_dos.c | |
parent | 4edde96111aefac63d6aaca6ba87a90d149e973e (diff) | |
download | u-boot-192bc6948b02ff4168cab16162fffb507946dc2b.tar.gz |
Fix GCC format-security errors and convert sprintfs.
With format-security errors turned on, GCC picks up the use of sprintf with
a format parameter not being a string literal.
Simple uses of sprintf are also converted to use strcpy.
Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
Acked-by: Wolfgang Denk <wd@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'disk/part_dos.c')
-rw-r--r-- | disk/part_dos.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/disk/part_dos.c b/disk/part_dos.c index 1e5cb330cd..08872d6a03 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -237,7 +237,7 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, break; } /* sprintf(info->type, "%d, pt->sys_ind); */ - sprintf ((char *)info->type, "U-Boot"); + strcpy((char *)info->type, "U-Boot"); info->bootable = is_bootable(pt); #ifdef CONFIG_PARTITION_UUIDS sprintf(info->uuid, "%08x-%02x", disksig, part_num); @@ -273,7 +273,7 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, info->size = dev_desc->lba; info->blksz = DOS_PART_DEFAULT_SECTOR; info->bootable = 0; - sprintf ((char *)info->type, "U-Boot"); + strcpy((char *)info->type, "U-Boot"); #ifdef CONFIG_PARTITION_UUIDS info->uuid[0] = 0; #endif |