Fix multiple issues reported by Coverity Scan
This commit is contained in:
@@ -643,7 +643,7 @@ static int sdmmc_sd_switch(sdmmc_device_t *device, uint32_t mode, uint32_t group
|
||||
static int sdmmc_sd_set_current_limit(sdmmc_device_t *device, uint8_t *status)
|
||||
{
|
||||
/* Start with the highest possible limit. */
|
||||
uint32_t current_limit = SD_SET_CURRENT_LIMIT_800;
|
||||
int32_t current_limit = SD_SET_CURRENT_LIMIT_800;
|
||||
|
||||
/* Try each limit. */
|
||||
while (current_limit > SD_SET_CURRENT_NO_CHANGE)
|
||||
|
||||
@@ -110,5 +110,6 @@ void load_stage2(const char *bct0) {
|
||||
g_chainloader_entries[0].num = 0;
|
||||
g_chainloader_entrypoint = config.entrypoint;
|
||||
|
||||
strncpy(g_stage2_path, config.path, sizeof(g_stage2_path));
|
||||
strncpy(g_stage2_path, config.path, sizeof(g_stage2_path) - 1);
|
||||
g_stage2_path[sizeof(g_stage2_path) - 1] = '\0';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user