mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-07-07 04:22:56 +00:00
Minor fixes
This commit is contained in:
parent
448995f8b0
commit
ac7a77fd47
@ -171,7 +171,7 @@ volk_gnsssdr_type_t volk_gnsssdr_type_from_string(std::string name)
|
|||||||
type.is_signed = false;
|
type.is_signed = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw;
|
throw std::string("Error: no such type: '") + name[i] + "'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +238,7 @@ static void get_signatures_from_name(std::vector<volk_gnsssdr_type_t> &inputsig,
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
if (token[0] == 'x' && (token.size() > 1) && (token[1] > '0' || token[1] < '9'))
|
if (token[0] == 'x' && (token.size() > 1) && (token[1] > '0' && token[1] < '9'))
|
||||||
{
|
{
|
||||||
if (side == SIDE_INPUT)
|
if (side == SIDE_INPUT)
|
||||||
assert(inputsig.size() > 0);
|
assert(inputsig.size() > 0);
|
||||||
|
@ -102,7 +102,13 @@ size_t volk_gnsssdr_load_preferences(volk_gnsssdr_arch_pref_t **prefs_res)
|
|||||||
// reset the file pointer and write the prefs into volk_gnsssdr_arch_prefs
|
// reset the file pointer and write the prefs into volk_gnsssdr_arch_prefs
|
||||||
while (fgets(line, sizeof(line), config_file) != NULL)
|
while (fgets(line, sizeof(line), config_file) != NULL)
|
||||||
{
|
{
|
||||||
prefs = (volk_gnsssdr_arch_pref_t *)realloc(prefs, (n_arch_prefs + 1) * sizeof(*prefs));
|
void *new_prefs = realloc(prefs, (n_arch_prefs + 1) * sizeof(*prefs));
|
||||||
|
if (!new_prefs)
|
||||||
|
{
|
||||||
|
printf("volk_gnsssdr_load_preferences: bad malloc\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
prefs = (volk_gnsssdr_arch_pref_t *)new_prefs;
|
||||||
volk_gnsssdr_arch_pref_t *p = prefs + n_arch_prefs;
|
volk_gnsssdr_arch_pref_t *p = prefs + n_arch_prefs;
|
||||||
if (sscanf(line, "%s %s %s", p->name, p->impl_a, p->impl_u) == 3 && !strncmp(p->name, "volk_gnsssdr_", 5))
|
if (sscanf(line, "%s %s %s", p->name, p->impl_a, p->impl_u) == 3 && !strncmp(p->name, "volk_gnsssdr_", 5))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user