diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2019-04-09 05:30:05 +0000 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2019-04-21 10:26:52 +0200 |
commit | b762aa126e648fa9bc62fc8997b01a4a73089367 (patch) | |
tree | 238153a7aa77e7ae6ab2344f5a5329d6fd953253 /drivers/fastboot | |
parent | 6fe7dd3327d552bacf4266d7f1ed074bf98ffb92 (diff) | |
download | u-boot-b762aa126e648fa9bc62fc8997b01a4a73089367.tar.gz |
fastboot: Replace literal 32 with PART_NAME_LEN
Where we have to compute partition names, rather than using a hardcoded
32 for the partition name length, replace with PART_NAME_LEN.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Eugeniu Rosca <rosca.eugeniu@gmail.com>
Diffstat (limited to 'drivers/fastboot')
-rw-r--r-- | drivers/fastboot/fb_mmc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index d04d8a448c..90ca81da9b 100644 --- a/drivers/fastboot/fb_mmc.c +++ b/drivers/fastboot/fb_mmc.c @@ -31,13 +31,13 @@ static int part_get_info_by_name_or_alias(struct blk_desc *dev_desc, ret = part_get_info_by_name(dev_desc, name, info); if (ret < 0) { - /* strlen("fastboot_partition_alias_") + 32(part_name) + 1 */ - char env_alias_name[25 + 32 + 1]; + /* strlen("fastboot_partition_alias_") + PART_NAME_LEN + 1 */ + char env_alias_name[25 + PART_NAME_LEN + 1]; char *aliased_part_name; /* check for alias */ strcpy(env_alias_name, "fastboot_partition_alias_"); - strncat(env_alias_name, name, 32); + strncat(env_alias_name, name, PART_NAME_LEN); aliased_part_name = env_get(env_alias_name); if (aliased_part_name != NULL) ret = part_get_info_by_name(dev_desc, |