Fix multiple issues reported by Coverity Scan

This commit is contained in:
hexkyz committed 2018-07-26 18:45:18 +01:00
1 parent fd88bd1d2c
commit 7836609839
10 files changed
+30 -14

No files matched your search

+1 -1
View File
@@ -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)
+2 -1
View File
@@ -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';
}