Commit 33a26719 authored by Aurelio Colosimo's avatar Aurelio Colosimo

st_com_add_foreign function rewritten without empty if branches

parent ae289632
......@@ -92,8 +92,11 @@ void st_com_add_foreign(struct pp_instance *ppi, unsigned char *buf)
j = (j + 1) % ppi->number_foreign_records;
}
/* Old foreign master */
if (found)
return;
/* New foreign master */
if (!found) {
if (ppi->number_foreign_records <
ppi->max_foreign_records) {
ppi->number_foreign_records++;
......@@ -121,7 +124,6 @@ void st_com_add_foreign(struct pp_instance *ppi, unsigned char *buf)
ppi->foreign_record_i = (ppi->foreign_record_i+1) %
ppi->max_foreign_records;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment