Clean up compiler warning in port.c. v2 - reformat commit message Gcc (and presumably other compilers) emits a warning about the declaration of 'dscmp' shadowing a global declaration in bmc.h. This warning is completely benign but makes it more difficult to recognize warnings that might be consequential. This patch renames the variable 'dscmp' to 'clk_dscmp'. Signed-off-by: Michael Galassi <michael@galassi.us>
diff --git a/port.c b/port.c index 957c5fe..95460a4 100644 --- a/port.c +++ b/port.c
@@ -2768,11 +2768,11 @@ struct foreign_clock *port_compute_best(struct port *p) { - int (*dscmp)(struct dataset *a, struct dataset *b); + int (*clk_dscmp)(struct dataset *a, struct dataset *b); struct foreign_clock *fc; struct ptp_message *tmp; - dscmp = clock_dscmp(p->clock); + clk_dscmp = clock_dscmp(p->clock); p->best = NULL; if (p->master_only) @@ -2792,7 +2792,7 @@ if (!p->best) p->best = fc; - else if (dscmp(&fc->dataset, &p->best->dataset) > 0) + else if (clk_dscmp(&fc->dataset, &p->best->dataset) > 0) p->best = fc; else fc_clear(fc);